diff options
author | jasone <jasone@FreeBSD.org> | 2001-05-20 23:08:33 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-05-20 23:08:33 +0000 |
commit | adf603d4b170a8622047e0fd342070ac6f07caf4 (patch) | |
tree | c37f9e05a6d81f226bfef98090c73e613802b9c7 /lib/libkse/thread/thr_sig.c | |
parent | cdb5d97b478a3e4f97dd6c0cd43105d0951daed5 (diff) | |
download | FreeBSD-src-adf603d4b170a8622047e0fd342070ac6f07caf4.zip FreeBSD-src-adf603d4b170a8622047e0fd342070ac6f07caf4.tar.gz |
Instead of using a join queue for each thread, use a single pointer to
keep track of a joiner. POSIX only supports a single joiner, so this
simplification is acceptable.
At the same time, make sure to mark a joined thread as detached so that
its resources can be freed.
Reviewed by: deischen
PR: 24345
Diffstat (limited to 'lib/libkse/thread/thr_sig.c')
-rw-r--r-- | lib/libkse/thread/thr_sig.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/libkse/thread/thr_sig.c b/lib/libkse/thread/thr_sig.c index 9ce53a0..fd5180c 100644 --- a/lib/libkse/thread/thr_sig.c +++ b/lib/libkse/thread/thr_sig.c @@ -670,11 +670,8 @@ thread_sig_add(pthread_t pthread, int sig, int has_args) * States which cannot be interrupted but still require the * signal handler to run: */ - case PS_JOIN: - /* Only set the interrupted flag for PS_JOIN: */ - pthread->interrupted = 1; - /* FALLTHROUGH */ case PS_COND_WAIT: + case PS_JOIN: case PS_MUTEX_WAIT: /* * Remove the thread from the wait queue. It will @@ -955,11 +952,6 @@ _thread_sig_wrapper(void) psf->saved_state.psd_state = PS_RUNNING; break; - case PS_JOIN: - _join_backout(thread); - psf->saved_state.psd_state = PS_RUNNING; - break; - case PS_MUTEX_WAIT: _mutex_lock_backout(thread); psf->saved_state.psd_state = PS_RUNNING; |