(AIO_MISC_NOTIFY): Don't decrement counterp if it is already zero.
authordrepper <drepper>
Tue, 5 Sep 2006 15:22:18 +0000 (15:22 +0000)
committerdrepper <drepper>
Tue, 5 Sep 2006 15:22:18 +0000 (15:22 +0000)
nptl/sysdeps/pthread/aio_misc.h

index f285083..c5a11f4 100644 (file)
@@ -29,7 +29,7 @@
 
 #define AIO_MISC_NOTIFY(waitlist) \
   do {                                                                       \
-    if (--*waitlist->counterp == 0)                                          \
+    if (*waitlist->counterp > 0 && --*waitlist->counterp == 0)               \
       lll_futex_wake (waitlist->counterp, 1);                                \
   } while (0)