diff options
author | davidxu <davidxu@FreeBSD.org> | 2007-05-09 08:39:33 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2007-05-09 08:39:33 +0000 |
commit | d97c4f1e52204982c2c5d0ccda0b2e54bf010712 (patch) | |
tree | 82992c905443fab7febb24abd2e516ef359f7c8f | |
parent | 2ddb46eeb6224ecb7078555faf58fa91374c0760 (diff) | |
download | FreeBSD-src-d97c4f1e52204982c2c5d0ccda0b2e54bf010712.zip FreeBSD-src-d97c4f1e52204982c2c5d0ccda0b2e54bf010712.tar.gz |
backout experimental adaptive spinning mutex for product use.
-rw-r--r-- | lib/libthr/thread/thr_init.c | 7 | ||||
-rw-r--r-- | lib/libthr/thread/thr_mutex.c | 1 | ||||
-rw-r--r-- | lib/libthr/thread/thr_umtx.c | 1 |
3 files changed, 0 insertions, 9 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 7d00a34..981941b 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -66,7 +66,6 @@ pthreadlist _thread_gc_list = TAILQ_HEAD_INITIALIZER(_thread_gc_list); int _thread_active_threads = 1; atfork_head _thr_atfork_list = TAILQ_HEAD_INITIALIZER(_thr_atfork_list); struct umutex _thr_atfork_lock = DEFAULT_UMUTEX; -int _thr_adaptive_spin = 0; struct pthread_prio _thr_priorities[3] = { {RTP_PRIO_MIN, RTP_PRIO_MAX, 0}, /* FIFO */ @@ -424,12 +423,6 @@ init_private(void) { size_t len; int mib[2]; - char *p; - - if (init_once == 0) { - if ((p = getenv("LIBPTHREAD_ADAPTIVE_SPIN")) != NULL) - _thr_adaptive_spin = atoi(p); - } _thr_umutex_init(&_mutex_static_lock); _thr_umutex_init(&_cond_static_lock); diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 304fc80..c08ee81 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -136,7 +136,6 @@ 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); } diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c index 1aa89ca..0a5ee6a 100644 --- a/lib/libthr/thread/thr_umtx.c +++ b/lib/libthr/thread/thr_umtx.c @@ -36,7 +36,6 @@ _thr_umutex_init(struct umutex *mtx) static struct umutex default_mtx = DEFAULT_UMUTEX; *mtx = default_mtx; - mtx->m_spincount = _thr_adaptive_spin; } int |