diff options
author | davidxu <davidxu@FreeBSD.org> | 2004-10-23 23:28:36 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2004-10-23 23:28:36 +0000 |
commit | df721e35be3c19465326438aaee1cf0445ce76b9 (patch) | |
tree | 95da86c441c1081dff7d70fbd4ecebcf91db48ea /lib/libpthread/thread/thr_sig.c | |
parent | 590558cea722536b653cc600ce15022b909daf8d (diff) | |
download | FreeBSD-src-df721e35be3c19465326438aaee1cf0445ce76b9.zip FreeBSD-src-df721e35be3c19465326438aaee1cf0445ce76b9.tar.gz |
1. Move thread list flags into new separate member, and atomically
put DEAD thread on GC list, this closes a race between pthread_join
and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
deallocation code in rtld seems no lock protection or it is broken,
under stress testing, memory is corrupted.
Reviewed by: deischen
patch partly provided by: deischen
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
-rw-r--r-- | lib/libpthread/thread/thr_sig.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c index 81982d7..adca517 100644 --- a/lib/libpthread/thread/thr_sig.c +++ b/lib/libpthread/thread/thr_sig.c @@ -1199,8 +1199,7 @@ static void thr_sigframe_save(struct pthread *thread, struct pthread_sigframe *psf) { /* This has to initialize all members of the sigframe. */ - psf->psf_flags = - thread->flags & (THR_FLAGS_PRIVATE | THR_FLAGS_IN_TDLIST); + psf->psf_flags = thread->flags & THR_FLAGS_PRIVATE; psf->psf_interrupted = thread->interrupted; psf->psf_timeout = thread->timeout; psf->psf_state = thread->state; |