]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 12 Oct 2002 00:49:44 +0000 (00:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 12 Oct 2002 00:49:44 +0000 (00:49 +0000)
* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use
INTERNAL_SYSCALL is possible.

* sysdeps/unix/sysv/linux/i386/sysdep.h
(INTERNAL_SYSCALL_ERROR_P): New define.
(INTERNAL_SYSCALL_ERRNO): Likewise.

ChangeLog
sysdeps/unix/sysv/linux/i386/sysdep.h
sysdeps/unix/sysv/linux/sigwait.c

index a6011dfc06f659012e5ff89fbbeb0c9221030d06..6ba5af12edd7b943a75ccf7fa570bb8b60319f94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use
+       INTERNAL_SYSCALL is possible.
+
+       * sysdeps/unix/sysv/linux/i386/sysdep.h
+       (INTERNAL_SYSCALL_ERROR_P): New define.
+       (INTERNAL_SYSCALL_ERRNO): Likewise.
+
        * sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
        Add hack to prevent the compiler from clobbering the signal
        context.
index 87dfe9042ce5f5601b341211f4b4ef98aafc7161..ac7edb406cc91c64acc0e2a035c86628198c0327 100644 (file)
@@ -291,9 +291,9 @@ asm (".L__X'%ebx = 1\n\t"
 #define INLINE_SYSCALL(name, nr, args...) \
   ({                                                                         \
     unsigned int resultvar = INTERNAL_SYSCALL(name, nr, args);               \
-    if (resultvar >= 0xfffff001)                                             \
+    if (INTERNAL_SYSCALL_ERROR_P (resultvar))                                \
       {                                                                              \
-       __set_errno (-resultvar);                                             \
+       __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar));                     \
        resultvar = 0xffffffff;                                               \
       }                                                                              \
     (int) resultvar; })
@@ -315,6 +315,12 @@ asm (".L__X'%ebx = 1\n\t"
     : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc");                 \
     (int) resultvar; })
 
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val)  ((val) >= 0xfffff001)
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val)    (-(val))
+
 #define LOADARGS_0
 #define LOADARGS_1 \
     "bpushl .L__X'%k2, %k2\n\t"                                                      \
index 6eb4cf95327791a6025acdac66f6aaeb535ef1fb..121e5e055723b1efc639cb83318022fb04f20482 100644 (file)
@@ -40,9 +40,19 @@ __sigwait (set, sig)
 
   /* XXX The size argument hopefully will have to be changed to the
      real size of the user-level sigset_t.  */
-  /* XXX INLINE_SYSCALL_NOERROR candiate.  */
-  ret =  INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
-                        NULL, NULL, _NSIG / 8);
+#ifdef INTERNAL_SYSCALL
+  ret = INTERNAL_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
+                         NULL, NULL, _NSIG / 8);
+  if (! INTERNAL_SYSCALL_ERROR_P (ret))
+    {
+      *sig = ret;
+      ret = 0;
+    }
+  else
+    ret = INTERNAL_SYSCALL_ERRNO (ret);
+#else
+  ret = INLINE_SYSCALL (rt_sigtimedwait, 4, CHECK_SIGSET (set),
+                       NULL, NULL, _NSIG / 8);
   if (ret != -1)
     {
       *sig = ret;
@@ -50,6 +60,7 @@ __sigwait (set, sig)
     }
   else
     ret = errno;
+#endif
 
   return ret;
 }
This page took 0.045563 seconds and 5 git commands to generate.