mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
aio / timers: add ppoll support with qemu_poll_ns
Add qemu_poll_ns which works like g_poll but takes a nanosecond timeout. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
043a7e1f8f
commit
4e0c6529fc
3 changed files with 55 additions and 0 deletions
19
configure
vendored
19
configure
vendored
|
@ -2818,6 +2818,22 @@ if compile_prog "" "" ; then
|
|||
dup3=yes
|
||||
fi
|
||||
|
||||
# check for ppoll support
|
||||
ppoll=no
|
||||
cat > $TMPC << EOF
|
||||
#include <poll.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct pollfd pfd = { .fd = 0, .events = 0, .revents = 0 };
|
||||
ppoll(&pfd, 1, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
ppoll=yes
|
||||
fi
|
||||
|
||||
# check for epoll support
|
||||
epoll=no
|
||||
cat > $TMPC << EOF
|
||||
|
@ -3814,6 +3830,9 @@ fi
|
|||
if test "$dup3" = "yes" ; then
|
||||
echo "CONFIG_DUP3=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$ppoll" = "yes" ; then
|
||||
echo "CONFIG_PPOLL=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$epoll" = "yes" ; then
|
||||
echo "CONFIG_EPOLL=y" >> $config_host_mak
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue