mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
signalfd compatibility
Port qemu-kvm's signalfd compat code. commit 5a7fdd0abd7cd24dac205317a4195446ab8748b5 Author: Anthony Liguori <aliguori@us.ibm.com> Date: Wed May 7 11:55:47 2008 -0500 Use signalfd() in io-thread This patch reworks the IO thread to use signalfd() instead of sigtimedwait() This will eliminate the need to use SIGIO everywhere. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
296acb643b
commit
dcc38d1cce
4 changed files with 179 additions and 0 deletions
18
configure
vendored
18
configure
vendored
|
@ -1957,6 +1957,21 @@ if compile_prog "" "" ; then
|
|||
splice=yes
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# signalfd probe
|
||||
signalfd="no"
|
||||
cat > $TMPC << EOF
|
||||
#define _GNU_SOURCE
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <signal.h>
|
||||
int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }
|
||||
EOF
|
||||
|
||||
if compile_prog "" "" ; then
|
||||
signalfd=yes
|
||||
fi
|
||||
|
||||
# check if eventfd is supported
|
||||
eventfd=no
|
||||
cat > $TMPC << EOF
|
||||
|
@ -2559,6 +2574,9 @@ fi
|
|||
if test "$fdt" = "yes" ; then
|
||||
echo "CONFIG_FDT=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$signalfd" = "yes" ; then
|
||||
echo "CONFIG_SIGNALFD=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$need_offsetof" = "yes" ; then
|
||||
echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue