Maarten Lankhorst : wineserver: Use syscall instead of int $0x80.

Alexandre Julliard julliard at winehq.org
Thu Jul 22 12:09:20 CDT 2010


Module: wine
Branch: master
Commit: c054b5f86dcd7cce0f1cace9e2c0421cc5f8194c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c054b5f86dcd7cce0f1cace9e2c0421cc5f8194c

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Sun Jun  6 01:06:48 2010 +0200

wineserver: Use syscall instead of int $0x80.

---

 server/ptrace.c |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/server/ptrace.c b/server/ptrace.c
index 111368b..48b30b4 100644
--- a/server/ptrace.c
+++ b/server/ptrace.c
@@ -215,22 +215,12 @@ static inline int tkill( int tgid, int pid, int sig )
 #ifdef __linux__
     int ret = -ENOSYS;
 # ifdef __i386__
-    __asm__( "pushl %%ebx\n\t"
-             "movl %2,%%ebx\n\t"
-             "int $0x80\n\t"
-             "popl %%ebx\n\t"
-             : "=a" (ret)
-             : "0" (270) /*SYS_tgkill*/, "r" (tgid), "c" (pid), "d" (sig) );
-    if (ret == -ENOSYS)
-        __asm__( "pushl %%ebx\n\t"
-                 "movl %2,%%ebx\n\t"
-                 "int $0x80\n\t"
-                 "popl %%ebx\n\t"
-                 : "=a" (ret)
-                 : "0" (238) /*SYS_tkill*/, "r" (pid), "c" (sig) );
+    ret = syscall(270 /*SYS_tgkill*/, tgid, pid, sig);
+    if (ret < 0 && errno == -ENOSYS)
+        ret = syscall(238 /*SYS_tkill*/, pid, sig);
+    return ret;
 # elif defined(__x86_64__)
-    __asm__( "syscall" : "=a" (ret)
-             : "0" (200) /*SYS_tkill*/, "D" (pid), "S" (sig) );
+    return syscall(200 /*SYS_tkill*/, pid, sig);
 # endif
     if (ret >= 0) return ret;
     errno = -ret;




More information about the wine-cvs mailing list