Don't use __libc_locking_needed, use multiple_threads field in TCB.
[kopensolaris-gnu/glibc.git] / nptl / sysdeps / unix / sysv / linux / i386 / i486 / libc-lowlevellock.S
index 9a124ab..27275e3 100644 (file)
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include <sysdep.h>
+#include <tls.h>
 
        .text
 
@@ -48,7 +49,7 @@ __lll_lock_wait:
 
        orl     $-1, %eax       /* Load -1.  */
 #ifndef UP
-       cmpl    $0, __libc_locking_needed
+       cmpl    $0, %gs:MULTIPLE_THREADS_OFFSET
        je,pt   0f
        lock
 0:
@@ -77,7 +78,7 @@ lll_unlock_wake_cb:
 
        movl    20(%esp), %ebx
 #ifndef UP
-       cmpl    $0, __libc_locking_needed
+       cmpl    $0, %gs:MULTIPLE_THREADS_OFFSET
        je,pt   0f
        lock
 0:
@@ -182,3 +183,13 @@ __lll_timedwait_tid:
 6:     movl    $ETIMEDOUT, %eax
        jmp     3b
        .size   __lll_timedwait_tid,.-__lll_timedwait_tid
+
+
+       .section .gnu.linkonce.t.__i686.get_pc_thunk.dx,"ax",@progbits
+       .globl __i686.get_pc_thunk.dx
+       .hidden __i686.get_pc_thunk.dx
+       .type __i686.get_pc_thunk.dx,@function
+__i686.get_pc_thunk.dx:
+       movl    (%esp), %edx
+       ret
+       .size   __i686.get_pc_thunk.dx,.-__i686.get_pc_thunk.dx