diff options
author | deischen <deischen@FreeBSD.org> | 2000-03-15 13:59:27 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2000-03-15 13:59:27 +0000 |
commit | 228266df1122dd0b3102d45629ae1e0d7ae42f31 (patch) | |
tree | dbe86a4d7c4333049e4c8db5b8b117b8ae2e6c7c /lib/libpthread/thread/thr_private.h | |
parent | 87a0ee8fd64ec5f1e02e3bef4a0de750d7bede50 (diff) | |
download | FreeBSD-src-228266df1122dd0b3102d45629ae1e0d7ae42f31.zip FreeBSD-src-228266df1122dd0b3102d45629ae1e0d7ae42f31.tar.gz |
Fix pthread_suspend_np/pthread_resume_np. For the record, suspending a
thread waiting on an event (I/O, condvar, etc) will, when resumed using
pthread_resume_np, return with EINTR. For example, suspending and resuming
a thread blocked on read() will not requeue the thread for the read, but
will return -1 with errno = EINTR. If the suspended thread is in a critical
region, the thread is suspended as soon as it leaves the critical region.
Fix a bogon in pthread_kill() where a signal was being delivered twice
to threads waiting in sigwait().
Reported by (suspend/resume bug): jdp
Reviewed by: jasone
Diffstat (limited to 'lib/libpthread/thread/thr_private.h')
-rw-r--r-- | lib/libpthread/thread/thr_private.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index 962eb86..07c8bec 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -105,7 +105,7 @@ else \ TAILQ_INSERT_BEFORE(tid,thrd,pqe); \ } \ - (thrd)->flags | PTHREAD_FLAGS_IN_WAITQ; \ + (thrd)->flags |= PTHREAD_FLAGS_IN_WAITQ; \ } while (0) #define PTHREAD_WAITQ_CLEARACTIVE() #define PTHREAD_WAITQ_SETACTIVE() @@ -576,6 +576,8 @@ struct pthread { #define PTHREAD_CANCEL_NEEDED 0x0010 int cancelflags; + int suspended; + thread_continuation_t continuation; /* |