/[qemu]
ViewVC logotype

Revision 5633


Jump to revision: Previous Next
Author: aliguori
Date: Wed Nov 5 20:29:45 2008 UTC (15 years ago)
Changed paths: 1
Log Message:
Fix alarm_timer race with select - v3 (Jan Kiszka)

Changing the default IO timeout to 5 s (#5578) made a race visible
between the alarm_timer and select() in main_loop_wait(): If the timer
fired before select was able to block, the full select() timeout could
have been applied instead of returning immediately. Since #5578, this
causes heavy problems to the Musicpal board emulation with stalls up to
5 s, but also with some older Linux guest kernels.

The following patch introduces a pipe that is written to by
host_alarm_handler and select()'ed in main_loop_wait(). This avoids
prevents that select() blocks though a timer has fired and waits for
processing.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


Changed paths:

Path Details
Directorytrunk/vl.c modified , text changed

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.5