https://gitlab.synchro.net/main/sbbs/-/commit/ed7769af698b68949128e029
Modified Files:
src/odoors/ODCom.c ODInQue.c
Log Message:
Greatly lower CPU utilization of wait loop
When OpenDoors is waiting for a set period (or forever) for a key
from the remote, store that period in a global variable (capped
to 250ms, which is the kernel rerun timer) before calling the
kernel while waiting.
For socket and stdio I/O modes, sit in poll() or select() for up
to that time (capped to 200ms, which is less than the kernel
rerun timer).
Since socket and stdio modes are also checking "carrier" and
only DOS does anything except check for carrier and new bytes in
the loop, and DOS doesn't support socket or stdio, we're not
blocking anything that matters here (as long as we update the
timers within 250ms).
Previously, OpenDoors would use about 7% of a core on my system
when waiting for a key from the remote in stdio and socket modes.
Now it uses about 0.02%.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net