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_init.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_init.c')
-rw-r--r-- | lib/libthr/thread/thr_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 3624cf8..ae4ea33 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -402,7 +402,8 @@ init_main_thread(struct pthread *thread) */ thread->magic = THR_MAGIC; - thread->cancelflags = PTHREAD_CANCEL_ENABLE | PTHREAD_CANCEL_DEFERRED; + thread->cancel_enable = 1; + thread->cancel_async = 0; thr_set_name(thread->tid, "initial thread"); /* Initialize the mutex queue: */ |