cvs commit: src/lib/libpthread/arch/amd64/amd64 context.S
src/lib/libpthread/arch/i386/i386
pthread_md.c src/lib/libpthread/test guard_b.c mutex_d.c
sigsuspend_d.c src/lib/libpthread/thread thr_cond.c thr_init.c
thr_kern.c thr_mutex.c thr_nanosleep.c thr_private.h ...
Daniel Eischen
deischen at FreeBSD.org
Thu Mar 16 23:29:09 UTC 2006
deischen 2006-03-16 23:29:08 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_6)
lib/libpthread/arch/amd64/amd64 context.S
lib/libpthread/arch/i386/i386 pthread_md.c
lib/libpthread/test guard_b.c mutex_d.c sigsuspend_d.c
lib/libpthread/thread thr_cond.c thr_init.c thr_kern.c
thr_mutex.c thr_nanosleep.c
thr_private.h thr_pspinlock.c thr_rtld.c
thr_sem.c thr_sig.c thr_sigsuspend.c
thr_symbols.c
Log:
MFC: Relevent commit logs are below.
Only catch SIGINFO (for dumping thread states) when LIBPTHREAD_DEBUG
is defined in the environment.
Modify the code path of the ifdef NOTYET part of _kse_single_thread():
o Don't reinitialise the atfork() handler list in the child. We
are meant to call the child handler, and on subsequent fork()s
should call all three functions as normal.
o Don't reinitialise the thread specific keyed data in the
child after a fork. Applications may require this for context.
o Reinitialise curthread->tlflags after removing ourselves from
(and reinitialising) the various internal thread lists.
o Reinitialise __malloc_lock in the child after fork() (to balance
our explicitly taking the lock prior to the fork()).
With these changes, it is possible to enable the NOTYET code in
thr_kern.c to allow the use of non-async-safe functions after
fork()ing from a threaded program.
Eliminate a race condition in timed waits (cv, mutex, and sleeps).
Don't forget to initialize a tailq before using it.
For the ``#ifdef NOTYET'' code that allows calling non-async-safe
functions in the child after a fork() from a threaded process,
use __sys_setprocmask() rather than setprocmask() to keep our
signal handling sane. Without this fix, signals are essentially
ignored in said child and things such as protection violations
result in an endless busy loop.
Allocate a thread's tcb last so it is easier to handle failures to
malloc() siginfo.
Include needed headers that were obtained through <pthread.h>. Sort headers
while here.
amd64
-----
Fix a race condition introduced when redzones were added. Use an
atomic operation to return and adjust the stack (amd64).
test
-----
o Include <string.h>
o Make this ILP32/LP64 clean: cast pointers to long.
Approved by: re (scottl)
Revision Changes Path
1.7.8.1 +4 -5 src/lib/libpthread/arch/amd64/amd64/context.S
1.7.2.1 +0 -1 src/lib/libpthread/arch/i386/i386/pthread_md.c
1.2.14.1 +5 -3 src/lib/libpthread/test/guard_b.c
1.4.10.1 +14 -13 src/lib/libpthread/test/mutex_d.c
1.2.10.1 +1 -1 src/lib/libpthread/test/sigsuspend_d.c
1.52.2.1 +5 -5 src/lib/libpthread/thread/thr_cond.c
1.70.2.1 +3 -1 src/lib/libpthread/thread/thr_init.c
1.116.2.1 +32 -26 src/lib/libpthread/thread/thr_kern.c
1.47.2.1 +22 -24 src/lib/libpthread/thread/thr_mutex.c
1.24.8.1 +3 -1 src/lib/libpthread/thread/thr_nanosleep.c
1.123.2.1 +1 -0 src/lib/libpthread/thread/thr_private.h
1.2.10.1 +5 -2 src/lib/libpthread/thread/thr_pspinlock.c
1.5.10.1 +7 -5 src/lib/libpthread/thread/thr_rtld.c
1.16.2.1 +1 -0 src/lib/libpthread/thread/thr_sem.c
1.83.2.1 +25 -16 src/lib/libpthread/thread/thr_sig.c
1.26.2.1 +5 -2 src/lib/libpthread/thread/thr_sigsuspend.c
1.1.8.1 +1 -0 src/lib/libpthread/thread/thr_symbols.c
More information about the cvs-src
mailing list