]> git.ipfire.org Git - thirdparty/qemu.git/commit - linux-user/syscall.c
linux-user: Use safe_syscall wrapper for poll and ppoll syscalls
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 6 Jun 2016 18:58:10 +0000 (19:58 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Wed, 8 Jun 2016 07:13:46 +0000 (10:13 +0300)
commita6130237b85e15463592484155aa905a9b39cc6c
tree8ce16363161b07ed73b1a89fc60b044db7106f07
parent9e518226f431454ce2d4d01051593b32515b3b55
linux-user: Use safe_syscall wrapper for poll and ppoll syscalls

Use the safe_syscall wrapper for the poll and ppoll syscalls.
Since not all host architectures will have a poll syscall, we
have to rewrite the TARGET_NR_poll handling to use ppoll instead
(we can assume everywhere has ppoll by now).

We take the opportunity to switch to the code structure
already used in the implementation of epoll_wait and epoll_pwait,
which uses a switch() to avoid interleaving #if and if (),
and to stop using a variable with a leading '_' which is in
the implementation's namespace.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c