* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
authorUlrich Drepper <drepper@redhat.com>
Wed, 30 May 2007 04:08:13 +0000 (04:08 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 30 May 2007 04:08:13 +0000 (04:08 +0000)
whether there are more than one thread makes no sense here since
we only call the slow path if the locks are taken.
* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.

nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
nptl/sysdeps/unix/sysv/linux/internaltypes.h
nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S

index 9d71dcc..b757f48 100644 (file)
@@ -1,5 +1,10 @@
 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
+       whether there are more than one thread makes no sense here since
+       we only call the slow path if the locks are taken.
+       * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
+
        * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
        COND_NWAITERS_SHIFT.
        * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
index f246711..830f628 100644 (file)
 
 #include <kernel-features.h>
 
-/* In libc.so we do not unconditionally use the lock prefix.  Only if
-   the application is using threads.  */
-#ifndef UP
-# define LOCK \
-       cmpl    $0, %gs:MULTIPLE_THREADS_OFFSET;                              \
-       je      0f;                                                           \
-       lock;                                                                 \
-0:
-#endif
-
 /* All locks in libc are private.  Use the kernel feature if possible.  */
 #define FUTEX_PRIVATE_FLAG     128
 #ifdef __ASSUME_PRIVATE_FUTEX
index dfd53a0..add20b6 100644 (file)
@@ -80,7 +80,7 @@ struct pthread_condattr
    of bits needed to represent the ID of the clock.  COND_NWAITERS_SHIFT
    is the number of bits reserved for other purposes like the clock.  */
 #define COND_CLOCK_BITS                1
-#define COND_NWAITERS_SHIFT    8
+#define COND_NWAITERS_SHIFT    1
 
 
 /* Read-write lock variable attribute data structure.  */
index 21bf58c..3265eee 100644 (file)
 
 #include <kernel-features.h>
 
-/* In libc.so we do not unconditionally use the lock prefix.  Only if
-   the application is using threads.  */
-#ifndef UP
-# define LOCK \
-       cmpl    $0, __libc_multiple_threads(%rip);                            \
-       je      0f;                                                           \
-       lock;                                                                 \
-0:
-#endif
-
 /* All locks in libc are private.  Use the kernel feature if possible.  */
 #define FUTEX_PRIVATE_FLAG     128
 #ifdef __ASSUME_PRIVATE_FUTEX