summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_mutex.c')
-rw-r--r--lib/libthr/thread/thr_mutex.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index 35b6352..fc233b6 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -212,19 +212,15 @@ int
_pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
void *(calloc_cb)(size_t, size_t))
{
-/* XXX Enable adaptive locking if similar code is removed from malloc. */
-#if 0
static const struct pthread_mutex_attr attr = {
- .m_type = PTHREAD_MUTEX_ADAPTIVE_NP,
+ .m_type = PTHREAD_MUTEX_NORMAL,
.m_protocol = PTHREAD_PRIO_NONE,
.m_ceiling = 0,
.m_flags = 0
};
+ static const struct pthread_mutex_attr *pattr = &attr;
- return mutex_init(mutex, (pthread_mutexattr_t *)&attr, 0, calloc_cb);
-#else
- return mutex_init(mutex, NULL, 0, calloc_cb);
-#endif
+ return mutex_init(mutex, (pthread_mutexattr_t *)&pattr, 0, calloc_cb);
}
void
OpenPOWER on IntegriCloud