summaryrefslogtreecommitdiff
path: root/libpthread/pthread/pt-internal.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-10-30 20:14:18 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-10-30 20:14:18 +0100
commitd88d71c54992e93c812ad33bb2b9962c71a78fd7 (patch)
treee478d8999e5a87dff31653c8d4a7ff6e828bfc64 /libpthread/pthread/pt-internal.h
parent62e8551e80d71082c6e2ae74cca0b1a157beedce (diff)
parent10c4673df9e51862737285c87270245e025c8c1f (diff)
Merge branch 'upstream-merged'
Diffstat (limited to 'libpthread/pthread/pt-internal.h')
-rw-r--r--libpthread/pthread/pt-internal.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/libpthread/pthread/pt-internal.h b/libpthread/pthread/pt-internal.h
index cb441d09..3f69d2dd 100644
--- a/libpthread/pthread/pt-internal.h
+++ b/libpthread/pthread/pt-internal.h
@@ -1,5 +1,5 @@
/* Internal defenitions for pthreads library.
- Copyright (C) 2000, 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -54,6 +54,16 @@ enum pthread_state
# define PTHREAD_SYSDEP_MEMBERS
#endif
+#ifdef ENABLE_TLS
+/* Type of the TCB. */
+typedef struct
+{
+ void *tcb; /* Points to this structure. */
+ void *dtv; /* Vector of pointers to TLS data. */
+ thread_t self; /* This thread's control port. */
+} tcbhead_t;
+#endif /* ENABLE_TLS */
+
/* This structure describes a POSIX thread. */
struct __pthread
{
@@ -89,6 +99,10 @@ struct __pthread
PTHREAD_SYSDEP_MEMBERS
+#ifdef ENABLE_TLS
+ tcbhead_t *tcb;
+#endif /* ENABLE_TLS */
+
struct __pthread *next, **prevp;
};
@@ -287,4 +301,17 @@ const struct __pthread_rwlockattr __pthread_default_rwlockattr;
/* Default condition attributes. */
const struct __pthread_condattr __pthread_default_condattr;
+
+#ifdef ENABLE_TLS
+
+/* From glibc. */
+
+/* Dynamic linker TLS allocation. */
+extern void *_dl_allocate_tls(void *);
+
+/* Dynamic linker TLS deallocation. */
+extern void _dl_deallocate_tls(void *, int);
+
+#endif /* ENABLE_TLS */
+
#endif /* pt-internal.h */