]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(lll_unlock_wake_cb): Correct last patch. (__lll_timedwait_tid): Don't check abstime...
authorUlrich Drepper <drepper@redhat.com>
Tue, 18 Mar 2003 00:50:30 +0000 (00:50 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 18 Mar 2003 00:50:30 +0000 (00:50 +0000)
nptl/sysdeps/unix/sysv/linux/lowlevellock.c
nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h

index 4ce42355b50e8460966feffec06885827b4651b2..99f804c98628758e4eb77eef1e989c42e4cfc46b 100644 (file)
@@ -80,8 +80,11 @@ hidden_proto (__lll_timedlock_wait)
 int
 lll_unlock_wake_cb (int *futex)
 {
-  if (__lll_add (futex, 1) + 1 != 0)
-    lll_futex_wake (futex, 1);
+  if (__lll_add (futex, -1) - 1 != 0)
+    {
+      *futex = 0;
+      lll_futex_wake (futex, 1);
+    }
 
   return 0;
 }
@@ -93,7 +96,7 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
 {
   int tid;
 
-  if (abstime == NULL || abstime->tv_nsec >= 1000000000)
+  if (abstime->tv_nsec >= 1000000000)
     return EINVAL;
 
   /* Repeat until thread terminated.  */
index daece67eabb98f1c137274dd6465ccd2dd92043f..b54ebbfca4903e75f16d0de9747e8116e03731b0 100644 (file)
@@ -226,7 +226,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
             __asm __volatile ("cmpl $0, __libc_multiple_threads(%%rip)\n\t"   \
                              "je 0f\n\t"                                     \
                              "lock\n"                                        \
-                             "0:\incl %0\n\t"                        \
+                             "0:\tincl %0\n\t"                       \
                              "jng 1f\n\t"                                    \
                              ".subsection 1\n"                               \
                              "1:\tleaq %0, %%rdi\n\t"                        \