From 17ffa4986db1ce263a8a3c4c322dc237cfaa2777 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 May 2001 07:39:56 +0000 Subject: Update. 2001-05-25 Ulrich Drepper * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before returning successfully. Patch by Gene Cooperman . --- linuxthreads/oldsemaphore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linuxthreads/oldsemaphore.c') 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 */ -- cgit v1.2.3