about summary refs log tree commit diff
path: root/linuxthreads/internals.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-30 02:13:26 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-30 02:13:26 +0000
commit746802f20fae7bd377ce5d7aa9114357af48e178 (patch)
treef8e4c7456aedf677054c4491264435137daa0d64 /linuxthreads/internals.h
parent6c3ebebd1eddb7041248125fa5e228380400c436 (diff)
downloadglibc-746802f20fae7bd377ce5d7aa9114357af48e178.tar.gz
glibc-746802f20fae7bd377ce5d7aa9114357af48e178.tar.xz
glibc-746802f20fae7bd377ce5d7aa9114357af48e178.zip
Update.
2001-08-29  Ulrich Drepper  <drepper@redhat.com>

	* 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.
Diffstat (limited to 'linuxthreads/internals.h')
-rw-r--r--linuxthreads/internals.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h
index d5b469b347..ae49266278 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.