diff options
author | mtm <mtm@FreeBSD.org> | 2004-06-27 10:01:35 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2004-06-27 10:01:35 +0000 |
commit | 32356d604915fd82194fe6d674571b7db002f1b7 (patch) | |
tree | 7f18580f62576acd89a952ab6952543489b92ea1 /lib/libthr/thread/thr_init.c | |
parent | 7598f9b9ec4cee0a912b90d99abf745006764240 (diff) | |
download | FreeBSD-src-32356d604915fd82194fe6d674571b7db002f1b7.zip FreeBSD-src-32356d604915fd82194fe6d674571b7db002f1b7.tar.gz |
Implement pthread_atfork in libthr. This is mostly from deichen's
work in libpthread.
Submitted by: Dan Nelson <dnelson@allantgroup.com>
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
-rw-r--r-- | lib/libthr/thread/thr_init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index cf1eb6b..548474d 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -334,6 +334,10 @@ _thread_init(void) getcontext(&pthread->ctx); pthread->ctx.uc_stack.ss_sp = pthread->stack; pthread->ctx.uc_stack.ss_size = PTHREAD_STACK_INITIAL; + + /* Initialize the atfork list and mutex */ + TAILQ_INIT(&_atfork_list); + _pthread_mutex_init(&_atfork_mutex, NULL); } /* |