diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-12-20 04:43:34 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-12-20 04:43:34 +0000 |
commit | e034ab54f2626f6cd7ab57942ba3b032684d2ed4 (patch) | |
tree | dd4940685abc260ad48b4612a46be2cb05f279aa /lib/libthr/thread/thr_mutex.c | |
parent | 5a984630fa31489671b035bd30308b299b2e2b50 (diff) | |
download | FreeBSD-src-e034ab54f2626f6cd7ab57942ba3b032684d2ed4.zip FreeBSD-src-e034ab54f2626f6cd7ab57942ba3b032684d2ed4.tar.gz |
Check environment variable PTHREAD_ADAPTIVE_SPIN, if it is set, use
it as a default spin cycle count.
Diffstat (limited to 'lib/libthr/thread/thr_mutex.c')
-rw-r--r-- | lib/libthr/thread/thr_mutex.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index aae27aa..17e067a 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -136,6 +136,7 @@ mutex_init(pthread_mutex_t *mutex, pmutex->m_lock.m_owner = UMUTEX_UNOWNED; pmutex->m_lock.m_flags = 0; } + pmutex->m_lock.m_spincount = _thr_adaptive_spin; *mutex = pmutex; return (0); } |