summaryrefslogtreecommitdiff
path: root/modules/strdup
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2012-05-21 09:52:42 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-05-22 10:11:38 +0200
commita2292d4ccb2bba35b010c5cbd0354345a35568fa (patch)
tree43888a8912c82b54e18d379828b2dbcf72ecc380 /modules/strdup
parent7e2a535f8c362d5d3905cac9ebd7df4622604992 (diff)
downloadgnulib-a2292d4ccb2bba35b010c5cbd0354345a35568fa.tar.gz
poll/select: prevent busy-waiting
2012-05-21 Paolo Bonzini <bonzini@gnu.org> poll/select: prevent busy-waiting. SwitchToThread() only gives away the rest of the current time slice to another thread in the current process. So if the thread that feeds the file decscriptor we're polling is not in the current process, we get busy-waiting. * lib/poll.c: Use SleepEx(1, TRUE) instead of SwitchToThread(). Patch from Theodore Leblond. * lib/select.c: Split polling out of the loop that sets the output fd_sets. Check for zero result and loop if the wait timeout is infinite.
Diffstat (limited to 'modules/strdup')
0 files changed, 0 insertions, 0 deletions