diff options
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/Makefile.in | 1 | ||||
-rw-r--r-- | libc/misc/pthread/Makefile.in | 1 | ||||
-rw-r--r-- | libc/misc/pthread/tsd.c | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/libc/misc/Makefile.in b/libc/misc/Makefile.in index 838081d66..6c09d3142 100644 --- a/libc/misc/Makefile.in +++ b/libc/misc/Makefile.in @@ -21,6 +21,7 @@ include $(top_srcdir)libc/misc/gnu/Makefile.in include $(top_srcdir)libc/misc/internals/Makefile.in include $(top_srcdir)libc/misc/locale/Makefile.in include $(top_srcdir)libc/misc/mntent/Makefile.in +include $(top_srcdir)libc/misc/pthread/Makefile.in include $(top_srcdir)libc/misc/regex/Makefile.in include $(top_srcdir)libc/misc/search/Makefile.in include $(top_srcdir)libc/misc/statfs/Makefile.in diff --git a/libc/misc/pthread/Makefile.in b/libc/misc/pthread/Makefile.in index ceea1c21b..48e816236 100644 --- a/libc/misc/pthread/Makefile.in +++ b/libc/misc/pthread/Makefile.in @@ -10,6 +10,7 @@ subdirs += libc/misc/pthread MISC_PTHREAD_DIR := $(top_srcdir)libc/misc/pthread MISC_PTHREAD_OUT := $(top_builddir)libc/misc/pthread +libc-shared-$(UCLIBC_HAS_THREADS) += $(MISC_PTHREAD_OUT)/tsd.os libc-$(UCLIBC_HAS_THREADS) += $(MISC_PTHREAD_OUT)/unlock.o libc-$(UCLIBC_HAS_THREADS) += $(MISC_PTHREAD_OUT)/weaks.o 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; +} + |