diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-11-24 09:57:38 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-11-24 09:57:38 +0000 |
commit | add205129cf16571a7deae9362723e40c389c06e (patch) | |
tree | 70b7566b0ef945730acd1e8a42ffeaebfdaa96af /lib/libthr/thread/thr_join.c | |
parent | 361abdf198cb3ffbc110373a06f93d4229802ae9 (diff) | |
download | FreeBSD-src-add205129cf16571a7deae9362723e40c389c06e.zip FreeBSD-src-add205129cf16571a7deae9362723e40c389c06e.tar.gz |
Eliminate atomic operations in thread cancellation functions, it should
reduce overheads of cancellation points.
Diffstat (limited to 'lib/libthr/thread/thr_join.c')
-rw-r--r-- | lib/libthr/thread/thr_join.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_join.c b/lib/libthr/thread/thr_join.c index de27074..92a3b62 100644 --- a/lib/libthr/thread/thr_join.c +++ b/lib/libthr/thread/thr_join.c @@ -76,7 +76,6 @@ join_common(pthread_t pthread, void **thread_return, struct timespec ts, ts2, *tsp; void *tmp; long tid; - int oldcancel; int ret = 0; if (pthread == NULL) @@ -104,7 +103,7 @@ join_common(pthread_t pthread, void **thread_return, THREAD_LIST_UNLOCK(curthread); THR_CLEANUP_PUSH(curthread, backout_join, pthread); - oldcancel = _thr_cancel_enter(curthread); + _thr_cancel_enter(curthread); tid = pthread->tid; while (pthread->tid != TID_TERMINATED) { @@ -123,7 +122,7 @@ join_common(pthread_t pthread, void **thread_return, break; } - _thr_cancel_leave(curthread, oldcancel); + _thr_cancel_leave(curthread); THR_CLEANUP_POP(curthread, 0); if (ret == ETIMEDOUT) { |