Use signalfd() to work around signal/select race
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 10 Sep 2008 15:45:19 +0000 (15:45 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 10 Sep 2008 15:45:19 +0000 (15:45 +0000)
commitb778fb62efcd19cda580ad98365c3f89afd48a15
tree44d96418e4d0e90c5841692a29743022fbc107c1
parent83fab73f397e47b90e40876f47585f1001e02f1f
Use signalfd() to work around signal/select race

This patch introduces signalfd() to work around the signal/select race in
checking for AIO completions.  For platforms that don't support signalfd(), we
emulate it with threads.

There was a long discussion about this approach.  I don't believe there are any
fundamental problems with this approach and I believe eliminating the use of
signals is a good thing.

I've tested Windows and Linux using Windows and Linux guests.  I've also checked
for disk IO performance regressions.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5187 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile
Makefile.target
block-raw-posix.c
block-raw-win32.c
block.c
block.h
vl.c