linux-user: Use safe_syscall for kill, tkill and tgkill syscalls
commitbef653d92e4e1c47c60f5c020ff6de69dba83478
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 27 May 2016 14:51:57 +0000 (27 15:51 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Tue, 7 Jun 2016 13:39:08 +0000 (7 16:39 +0300)
treecbdcf2af2e17339f44c303f7cb91541c152b8ca5
parenta0995886e23323258d0612c71f8b0416a02806f2
linux-user: Use safe_syscall for kill, tkill and tgkill syscalls

Use the safe_syscall wrapper for the kill, tkill and tgkill syscalls.
Without this, if a thread sent a SIGKILL to itself it could kill the
thread before we had a chance to process a signal that arrived just
before the SIGKILL, and that signal would get lost.

We drop all the ifdeffery for tkill and tgkill, because every guest
architecture we support implements them, and they've been in Linux
since 2003 so we can assume the host headers define the __NR_tkill
and __NR_tgkill constants.

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