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_create.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_create.c')
-rw-r--r-- | lib/libthr/thread/thr_create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 99e3d0c..276e550 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -105,8 +105,8 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, new_thread->magic = THR_MAGIC; new_thread->start_routine = start_routine; new_thread->arg = arg; - new_thread->cancelflags = PTHREAD_CANCEL_ENABLE | - PTHREAD_CANCEL_DEFERRED; + new_thread->cancel_enable = 1; + new_thread->cancel_async = 0; /* Initialize the mutex queue: */ TAILQ_INIT(&new_thread->mutexq); TAILQ_INIT(&new_thread->pp_mutexq); |