diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-09-25 07:09:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-09-25 07:09:36 +0000 |
commit | 079c00e64c9f6aafcd816790d49cb144d00a6a18 (patch) | |
tree | 605d9c1719330459b94eca01b07a30371cef3699 /linuxthreads | |
parent | a164874646386e3bba4d0ac17e6e69033396363f (diff) | |
download | glibc-079c00e64c9f6aafcd816790d49cb144d00a6a18.zip glibc-079c00e64c9f6aafcd816790d49cb144d00a6a18.tar.gz glibc-079c00e64c9f6aafcd816790d49cb144d00a6a18.tar.bz2 |
Update.
1999-09-24 Ulrich Drepper <drepper@cygnus.com>
* nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_grent): Do
not ovverwrite last group member with NULL pointer.
Reported by Thomas Winder <thomas.winder@newlogic.at>.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 5 | ||||
-rw-r--r-- | linuxthreads/condvar.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 1551059..1881795 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,8 @@ +1999-09-25 Ulrich Drepper <drepper@cygnus.com> + + * condvar.c (pthread_cond_timedwait_relative): Never return with + EINTR. Patch by Andreas Schwab. + 1999-09-19 Ulrich Drepper <drepper@cygnus.com> * signals.c (sigaction): Correct last patch. Don't select diff --git a/linuxthreads/condvar.c b/linuxthreads/condvar.c index cd22a24..a27b093 100644 --- a/linuxthreads/condvar.c +++ b/linuxthreads/condvar.c @@ -76,6 +76,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, enqueue(&cond->__c_waiting, self); __pthread_unlock(&cond->__c_lock); pthread_mutex_unlock(mutex); + continue_waiting: /* Set up a longjmp handler for the restart and cancel signals */ if (sigsetjmp(jmpbuf, 1) == 0) { THREAD_SETMEM(self, p_signal_jmp, &jmpbuf); @@ -113,13 +114,16 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, pthread_mutex_lock(mutex); pthread_exit(PTHREAD_CANCELED); } - /* If not signaled: also remove ourselves and return an error code */ + /* If not signaled: also remove ourselves and return an error code, but + only if the timeout has elapsed. If not, jsut continue waiting. */ if (THREAD_GETMEM(self, p_signal) == 0) { + if (retsleep != 0) + goto continue_waiting; __pthread_lock(&cond->__c_lock, self); remove_from_queue(&cond->__c_waiting, self); __pthread_unlock(&cond->__c_lock); pthread_mutex_lock(mutex); - return retsleep == 0 ? ETIMEDOUT : EINTR; + return ETIMEDOUT; } /* Otherwise, return normally */ pthread_mutex_lock(mutex); |