summaryrefslogtreecommitdiff
path: root/libc/misc/pthread/tsd.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-10-17 12:59:14 -0700
committerAustin Foxley <austinf@cetoncorp.com>2009-10-17 12:59:14 -0700
commit4a689f0b907d4a98582a9c4b7f6be811924db8ee (patch)
treefe4d0fef1868dfcc09fa1ef497ebfc22fac4d45e /libc/misc/pthread/tsd.c
parent8b7834d4008d10d8763d18b25580a4607a5e6607 (diff)
some tweaks under libc/ needed for nptl
* updated kernel-features.h * system is provided by pt-system with nptl * _exit should do exit_group with nptl * tsd tls ptr in libc * rt_sigwaitinfo impl added Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/misc/pthread/tsd.c')
-rw-r--r--libc/misc/pthread/tsd.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/misc/pthread/tsd.c b/libc/misc/pthread/tsd.c
new file mode 100644
index 000000000..434938d97
--- /dev/null
+++ b/libc/misc/pthread/tsd.c
@@ -0,0 +1,11 @@
+/* libpthread sets _dl_error_catch_tsd to point to this function.
+ We define it here instead of in libpthread so t here instead of in libpthread so that it doesn't
+ need to have a TLS segment of its own just for this one pointer. */
+
+void ** __attribute__ ((const))
+__libc_dl_error_tsd (void)
+{
+ static __thread void *data __attribute__ ((tls_model ("initial-exec")));
+ return &data;
+}
+