about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-05-25 07:39:56 +0000
committerUlrich Drepper <drepper@redhat.com>2001-05-25 07:39:56 +0000
commit17ffa4986db1ce263a8a3c4c322dc237cfaa2777 (patch)
treefe8ed226584c878ece16194d3f504d99edaade54
parent47e5d2a8b132c73bc0659baad25714326fb333c9 (diff)
downloadglibc-17ffa4986db1ce263a8a3c4c322dc237cfaa2777.tar.gz
glibc-17ffa4986db1ce263a8a3c4c322dc237cfaa2777.tar.xz
glibc-17ffa4986db1ce263a8a3c4c322dc237cfaa2777.zip
Update.
2001-05-25  Ulrich Drepper  <drepper@redhat.com>

	* oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
	returning successfully.
	Patch by Gene Cooperman <gene@ccs.neu.edu>.
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/oldsemaphore.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 6282a60b8e..b9d592c22a 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2001-05-25  Ulrich Drepper  <drepper@redhat.com>
+
+	* oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
+	returning successfully.
+	Patch by Gene Cooperman <gene@ccs.neu.edu>.
+
 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
 
 	* spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
diff --git a/linuxthreads/oldsemaphore.c b/linuxthreads/oldsemaphore.c
index 2099b8bbda..80a82dfcf6 100644
--- a/linuxthreads/oldsemaphore.c
+++ b/linuxthreads/oldsemaphore.c
@@ -113,7 +113,8 @@ int __old_sem_wait(old_sem_t * sem)
 	while (! sem_compare_and_swap(sem, oldstatus, newstatus));
 	if (newstatus & 1) {
 	    /* We got the semaphore. */
-	  __pthread_set_own_extricate_if(self, 0);
+	    __pthread_set_own_extricate_if(self, 0);
+	    self->p_nextwaiting = NULL;
 	    return 0;
 	}
 	/* Wait for sem_post or cancellation */