From 746802f20fae7bd377ce5d7aa9114357af48e178 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Aug 2001 02:13:26 +0000 Subject: Update. 2001-08-29 Ulrich Drepper * spinlock.c (__pthread_lock): Top max_count value with MAX_ADAPTIVE_SPIN_COUNT. * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done. * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to help P4. --- linuxthreads/internals.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'linuxthreads/internals.h') diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index d5b469b..ae49266 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -414,6 +414,13 @@ static inline pthread_descr thread_self (void) #define MAX_SPIN_COUNT 50 #endif +/* Max number of times the spinlock in the adaptive mutex implementation + spins actively on SMP systems. */ + +#ifndef MAX_ADAPTIVE_SPIN_COUNT +#define MAX_ADAPTIVE_SPIN_COUNT 100 +#endif + /* Duration of sleep (in nanoseconds) when we can't acquire a spinlock after MAX_SPIN_COUNT iterations of sched_yield(). With the 2.0 and 2.1 kernels, this MUST BE > 2ms. -- cgit v1.1