diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-05-23 20:51:45 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-05-23 20:51:45 +0000 |
commit | 5a8075b116280d0c1ece277e4be75250efca45b2 (patch) | |
tree | 7c63a4ba94c14bc46ececab97c299aff01078fb7 /nptl/sysdeps/i386 | |
parent | 6d59823c29df228415836f289e62064f95849e71 (diff) | |
download | glibc-5a8075b116280d0c1ece277e4be75250efca45b2.tar.gz glibc-5a8075b116280d0c1ece277e4be75250efca45b2.tar.xz glibc-5a8075b116280d0c1ece277e4be75250efca45b2.zip |
* init.c (__pthread_initialize_minimal_internal): Check whether
private futexes are available. * allocatestack.c (allocate_stack): Copy private_futex field from current thread into the new stack. * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private futexes if they are available. * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change in libc-lowlevellock.S allow using private futexes. * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define FUTEX_PRIVATE_FLAG. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes if they are available. * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise. * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX. * sysdeps/i386/tcb-offsets.sym: Likewise. * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field. * sysdeps/i386/tls.h (tcbhead_t): Likewise.
Diffstat (limited to 'nptl/sysdeps/i386')
-rw-r--r-- | nptl/sysdeps/i386/tcb-offsets.sym | 3 | ||||
-rw-r--r-- | nptl/sysdeps/i386/tls.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/nptl/sysdeps/i386/tcb-offsets.sym b/nptl/sysdeps/i386/tcb-offsets.sym index 7c8d9a5ca5..69f9deb368 100644 --- a/nptl/sysdeps/i386/tcb-offsets.sym +++ b/nptl/sysdeps/i386/tcb-offsets.sym @@ -12,3 +12,6 @@ CLEANUP offsetof (struct pthread, cleanup) CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev) MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock) POINTER_GUARD offsetof (tcbhead_t, pointer_guard) +#ifndef __ASSUME_PRIVATE_FUTEX +PRIVATE_FUTEX offsetof (tcbhead_t, private_futex) +#endif diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h index d9044f3fde..3bdf0f2b04 100644 --- a/nptl/sysdeps/i386/tls.h +++ b/nptl/sysdeps/i386/tls.h @@ -28,6 +28,7 @@ # include <stdlib.h> # include <list.h> # include <sysdep.h> +# include <kernel-features.h> /* Type for the dtv. */ @@ -53,6 +54,9 @@ typedef struct uintptr_t stack_guard; uintptr_t pointer_guard; int gscope_flag; +#ifndef __ASSUME_PRIVATE_FUTEX + int private_futex; +#endif } tcbhead_t; # define TLS_MULTIPLE_THREADS_IN_TCB 1 |