diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-09-06 04:04:10 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-09-06 04:04:10 +0000 |
commit | 21e453602609114dd397ffe11541b88ac47cbde4 (patch) | |
tree | 7044b040d8f18506b5f3294848fd18b67eaf0bd2 /lib/libthr/thread/thr_fork.c | |
parent | 670deaece645da636be8d143eb99b79497386ec3 (diff) | |
download | FreeBSD-src-21e453602609114dd397ffe11541b88ac47cbde4.zip FreeBSD-src-21e453602609114dd397ffe11541b88ac47cbde4.tar.gz |
Replace internal usage of struct umtx with umutex which can supports
real-time if we want, no functionality is changed.
Diffstat (limited to 'lib/libthr/thread/thr_fork.c')
-rw-r--r-- | lib/libthr/thread/thr_fork.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index 558a036..d622259 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -90,9 +90,9 @@ _pthread_atfork(void (*prepare)(void), void (*parent)(void), af->prepare = prepare; af->parent = parent; af->child = child; - THR_UMTX_LOCK(curthread, &_thr_atfork_lock); + THR_UMUTEX_LOCK(curthread, &_thr_atfork_lock); TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); - THR_UMTX_UNLOCK(curthread, &_thr_atfork_lock); + THR_UMUTEX_UNLOCK(curthread, &_thr_atfork_lock); return (0); } @@ -114,7 +114,7 @@ _fork(void) curthread = _get_curthread(); - THR_UMTX_LOCK(curthread, &_thr_atfork_lock); + THR_UMUTEX_LOCK(curthread, &_thr_atfork_lock); /* Run down atfork prepare handlers. */ TAILQ_FOREACH_REVERSE(af, &_thr_atfork_list, atfork_head, qe) { @@ -154,8 +154,8 @@ _fork(void) thr_self(&curthread->tid); /* clear other threads locked us. */ - _thr_umtx_init(&curthread->lock); - _thr_umtx_init(&_thr_atfork_lock); + _thr_umutex_init(&curthread->lock); + _thr_umutex_init(&_thr_atfork_lock); _thr_setthreaded(0); /* reinitialize libc spinlocks. */ @@ -189,7 +189,7 @@ _fork(void) af->parent(); } - THR_UMTX_UNLOCK(curthread, &_thr_atfork_lock); + THR_UMUTEX_UNLOCK(curthread, &_thr_atfork_lock); } errno = errsave; |