]> xenbits.xensource.com Git - people/dstodden/blktap.git/commit
PR-1129: Fix main loop timeout bug.
authorDaniel Stodden <daniel.stodden@citrix.com>
Tue, 15 Feb 2011 09:37:45 +0000 (01:37 -0800)
committerDaniel Stodden <daniel.stodden@citrix.com>
Tue, 15 Feb 2011 09:37:45 +0000 (01:37 -0800)
commitff58d5f9028f082e62734145a03f22d3edb34efa
tree585ecae18e109d7df9520b634e53990a2bc3b27e
parentbfaa6b34582a9763331fd83eabd4ffdee0e88545
PR-1129: Fix main loop timeout bug.

Calls to scheduler_check_fd_events return prematurely, failing to mark
a timeout pending, iff nfds is 0.

This leads to a condition where the deadline never gets reset, so the
next calculated timeout tv will be {0, 0} and we're left spinning in
select()s.

Fixed by separating fd and timeout checks.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
drivers/scheduler.c