From c033ead992a4e7bd8d031f25f3fa1256532c0540 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 29 Nov 2013 14:36:10 +0100 Subject: base: Fix race in PollQueue and remove SIGALRM workaround There is a race between enabling asynchronous IO for a file descriptor and IO events happening on that descriptor. A SIGIO won't normally be delivered if an event is pending when asynchronous IO is enabled. Instead, the signal will be raised the next time there is an event on the FD. This changeset simulates a SIGIO by setting the async_io flag when setting up asynchronous IO for an FD. This causes the main event loop to poll all file descriptors to check for pending IO. As a consequence of this, the old SIGALRM hack should no longer be needed and is therefore removed. --- src/sim/async.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'src/sim/async.cc') diff --git a/src/sim/async.cc b/src/sim/async.cc index 1a8e499f7..8ed00372c 100644 --- a/src/sim/async.cc +++ b/src/sim/async.cc @@ -33,6 +33,5 @@ volatile bool async_statdump = false; volatile bool async_statreset = false; volatile bool async_exit = false; volatile bool async_io = false; -volatile bool async_alarm = false; volatile bool async_exception = false; -- cgit v1.2.3