mirror of
https://github.com/open-simh/simh.git
synced 2026-01-14 07:40:35 +00:00
SCP: Slow down debug output writes when the debug fd is non blocking
This problem only appears when debug output is prodigious. That
prodigious activity is already dramatically affecting timing, so adding
additional delays to allow the debug output to catch up won't
make anything worse.
It appears that we could jump over the C runtime implementation of
fwrite() and do an explicit write() system call and retry that until it
succeeds, but this approach would have two negative consequences:
1) it would jump over other buffered data that the C runtime fwrite()
may have pending due to output produced by other than debug
activities, thus emitting output out of order.
2) Windows doesn't have a direct system call used by its C runtime
for write(), but merely implements write() as part of the C runtime
and as it turns out that write() returns an int vs a ssize_t type
result. An explicit cast could address this, but point 1 would still
be a concern.
As discussed in #957
This commit is contained in:
parent
b0ac93294e
commit
9cb93a64f2
Loading…
x
Reference in New Issue
Block a user