From 185f63708084bb396be1d2b7dd80883c6411fa34 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 27 Dec 2010 12:07:16 +0100 Subject: [PATCH] server: Use the tgkill system call on all Linux platforms. --- server/ptrace.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/server/ptrace.c b/server/ptrace.c index 99f9d2b2e8d..734ac8ed944 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -37,6 +37,9 @@ #ifdef HAVE_SYS_WAIT_H # include #endif +#ifdef HAVE_SYS_SYSCALL_H +# include +#endif #ifdef HAVE_SYS_THR_H # include # include @@ -213,17 +216,9 @@ static int wait4_thread( struct thread *thread, int signal ) static inline int tkill( int tgid, int pid, int sig ) { #ifdef __linux__ -# ifdef __i386__ - int ret = syscall(270 /*SYS_tgkill*/, tgid, pid, sig); - if (ret < 0 && errno == -ENOSYS) - ret = syscall(238 /*SYS_tkill*/, pid, sig); + int ret = syscall( SYS_tgkill, tgid, pid, sig ); + if (ret < 0 && errno == ENOSYS) ret = syscall( SYS_tkill, pid, sig ); return ret; -# elif defined(__x86_64__) - return syscall(234 /*SYS_tgkill*/, tgid, pid, sig); -# else - errno = ENOSYS; - return -1; -# endif #elif defined(__FreeBSD__) && defined(HAVE_THR_KILL2) return thr_kill2( tgid, pid, sig ); #else