diff options
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r-- | nptl/pthreadP.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 19efe1e35f..7f16ba9800 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -33,6 +33,7 @@ #include <kernel-features.h> #include <errno.h> #include <internal-signals.h> +#include "pthread_mutex_conf.h" /* Atomic operations on TLS memory. */ @@ -47,10 +48,14 @@ #endif -/* Adaptive mutex definitions. */ -#ifndef MAX_ADAPTIVE_COUNT -# define MAX_ADAPTIVE_COUNT 100 +static inline short max_adaptive_count (void) +{ +#if HAVE_TUNABLES + return __mutex_aconf.spin_count; +#else + return DEFAULT_ADAPTIVE_COUNT; #endif +} /* Magic cookie representing robust mutex with dead owner. */ |