aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog7
-rw-r--r--nptl/sysdeps/pthread/aio_misc.h2
-rw-r--r--nptl/sysdeps/pthread/gai_misc.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 3029360..e877428 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-05 Jakub Jelinek <jakub@redhat.com>
+ Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
+ counterp if it is already zero.
+ * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
+
2006-03-04 Jakub Jelinek <jakub@redhat.com>
Roland McGrath <roland@redhat.com>
diff --git a/nptl/sysdeps/pthread/aio_misc.h b/nptl/sysdeps/pthread/aio_misc.h
index f285083..c5a11f4 100644
--- a/nptl/sysdeps/pthread/aio_misc.h
+++ b/nptl/sysdeps/pthread/aio_misc.h
@@ -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)
diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h
index 1dc351a..9f6a73d 100644
--- a/nptl/sysdeps/pthread/gai_misc.h
+++ b/nptl/sysdeps/pthread/gai_misc.h
@@ -30,7 +30,7 @@
#define GAI_MISC_NOTIFY(waitlist) \
do { \
- if (--*waitlist->counterp == 0) \
+ if (*waitlist->counterp > 0 && --*waitlist->counterp == 0) \
lll_futex_wake (waitlist->counterp, 1); \
} while (0)