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_cond.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_cond.c')
-rw-r--r-- | lib/libthr/thread/thr_cond.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c index d0266d6..e587a6d 100644 --- a/lib/libthr/thread/thr_cond.c +++ b/lib/libthr/thread/thr_cond.c @@ -195,7 +195,6 @@ cond_wait_common(pthread_cond_t *cond, pthread_mutex_t *mutex, struct cond_cancel_info info; pthread_cond_t cv; long seq, oldseq; - int oldcancel; int ret = 0; /* @@ -231,9 +230,9 @@ cond_wait_common(pthread_cond_t *cond, pthread_mutex_t *mutex, if (cancel) { THR_CLEANUP_PUSH(curthread, cond_cancel_handler, &info); - oldcancel = _thr_cancel_enter(curthread); + _thr_cancel_enter(curthread); ret = _thr_umtx_wait(&cv->c_seqno, seq, tsp); - _thr_cancel_leave(curthread, oldcancel); + _thr_cancel_leave(curthread); THR_CLEANUP_POP(curthread, 0); } else { ret = _thr_umtx_wait(&cv->c_seqno, seq, tsp); |