]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
1. Move thread list flags into new separate member, and atomically
authordavidxu <davidxu@FreeBSD.org>
Sat, 23 Oct 2004 23:28:36 +0000 (23:28 +0000)
committerdavidxu <davidxu@FreeBSD.org>
Sat, 23 Oct 2004 23:28:36 +0000 (23:28 +0000)
commitdf721e35be3c19465326438aaee1cf0445ce76b9
tree95da86c441c1081dff7d70fbd4ecebcf91db48ea
parent590558cea722536b653cc600ce15022b909daf8d
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
lib/libkse/thread/thr_create.c
lib/libkse/thread/thr_find_thread.c
lib/libkse/thread/thr_kern.c
lib/libkse/thread/thr_private.h
lib/libkse/thread/thr_sig.c
lib/libpthread/thread/thr_create.c
lib/libpthread/thread/thr_find_thread.c
lib/libpthread/thread/thr_kern.c
lib/libpthread/thread/thr_private.h
lib/libpthread/thread/thr_sig.c