aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/pthread/Makefile
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-01-13 19:58:28 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 13:56:48 +0100
commitb05de1040009d0d07a5a2e2765cffe554ffbe6ac (patch)
tree2b112a97ce7947699fac8b6df47e6db0b5196ded /sysdeps/pthread/Makefile
parent6cefe985b869e7b33b05ce7252410474d8a6c3ad (diff)
downloadglibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.tar
glibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.tar.gz
glibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.tar.bz2
glibc-b05de1040009d0d07a5a2e2765cffe554ffbe6ac.zip
C11 threads: Move implementation to sysdeps/pthread
so it gets shared by nptl and htl. Also add htl versions of thrd_current and thrd_yield. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/pthread/Makefile')
-rw-r--r--sysdeps/pthread/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index 7f9eadd0e2..889f10d8b1 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -25,3 +25,21 @@ $(objpfx)tst-timer: $(objpfx)librt.a $(static-thread-library)
endif
endif
+
+ifneq (,$(filter $(subdir),htl nptl))
+headers += threads.h
+
+routines += thrd_current thrd_equal thrd_sleep thrd_yield
+
+libpthread-routines += thrd_create thrd_detach thrd_exit thrd_join \
+ call_once \
+ mtx_destroy mtx_init mtx_lock mtx_timedlock \
+ mtx_trylock mtx_unlock \
+ cnd_broadcast \
+ cnd_destroy cnd_init cnd_signal cnd_timedwait cnd_wait \
+ tss_create tss_delete tss_get tss_set
+
+tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \
+ tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \
+ tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock
+endif