diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2006-01-12 07:28:21 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2006-01-12 07:28:21 +0000 |
| commit | 52828c0e9cfdf1681a8c16cf313294ad1413ac25 (patch) | |
| tree | 25770955017440672d2cba68e6d8c382b53d9f75 /lib/libpthread/thread/thr_fork.c | |
| parent | 0b61bced98b63acd9e76e015a0b46bce86a0bdd4 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_fork.c')
| -rw-r--r-- | lib/libpthread/thread/thr_fork.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_fork.c b/lib/libpthread/thread/thr_fork.c index fdbfd86855f4..5445483ba4fb 100644 --- a/lib/libpthread/thread/thr_fork.c +++ b/lib/libpthread/thread/thr_fork.c @@ -91,7 +91,7 @@ _fork(void) /* Fork a new process: */ if (_kse_isthreaded() != 0) { - _spinlock(__malloc_lock); + _malloc_prefork(); } if ((ret = __sys_fork()) == 0) { /* Child process */ @@ -107,8 +107,8 @@ _fork(void) } _thr_mutex_reinit(&_thr_atfork_mutex); } else { - if ((_kse_isthreaded() != 0) && (__malloc_lock != NULL)) { - _spinunlock(__malloc_lock); + if (_kse_isthreaded() != 0) { + _malloc_postfork(); } errsave = errno; if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) { |
