aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-05-25 05:24:16 +0000
committerUlrich Drepper <drepper@redhat.com>2007-05-25 05:24:16 +0000
commit86acd5963441f4bfc087ceca8c30f8d72c6a5fa6 (patch)
tree1acc784992aafa1c297cc98232d609166f57d306 /nptl/sysdeps
parent0a54ab53f2bbbd380b019dc665047fb3acf37e3a (diff)
downloadglibc-86acd5963441f4bfc087ceca8c30f8d72c6a5fa6.tar
glibc-86acd5963441f4bfc087ceca8c30f8d72c6a5fa6.tar.gz
glibc-86acd5963441f4bfc087ceca8c30f8d72c6a5fa6.tar.bz2
glibc-86acd5963441f4bfc087ceca8c30f8d72c6a5fa6.zip
* sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
THREAD_COPY_PRIVATE_FUTEX): Define. * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX, THREAD_COPY_PRIVATE_FUTEX): Define. * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX. * init.c (__pthread_initialize_minimal_internal): Use THREAD_SET_PRIVATE_FUTEX.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r--nptl/sysdeps/i386/tls.h9
-rw-r--r--nptl/sysdeps/x86_64/tls.h7
2 files changed, 16 insertions, 0 deletions
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index 41e4327b4a..90a8b50dad 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -459,6 +459,15 @@ union user_desc_init
GL(dl_wait_lookup_done) ()
+#ifndef __ASSUME_PRIVATE_FUTEX
+# define THREAD_SET_PRIVATE_FUTEX(value) \
+ THREAD_SETMEM (THREAD_SELF, header.private_futex, value)
+# define THREAD_COPY_PRIVATE_FUTEX(descr) \
+ ((descr)->header.private_futex \
+ = THREAD_GETMEM (THREAD_SELF, header.private_futex))
+#endif
+
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index ab6efc47c3..cb3b474f97 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -364,6 +364,13 @@ typedef struct
#define THREAD_GSCOPE_WAIT() \
GL(dl_wait_lookup_done) ()
+#ifndef __ASSUME_PRIVATE_FUTEX
+# define THREAD_SET_PRIVATE_FUTEX(value) \
+ THREAD_SETMEM (THREAD_SELF, header.private_futex, value)
+# define THREAD_COPY_PRIVATE_FUTEX(descr) \
+ ((descr)->header.private_futex \
+ = THREAD_GETMEM (THREAD_SELF, header.private_futex))
+#endif
#endif /* __ASSEMBLER__ */