From b05de1040009d0d07a5a2e2765cffe554ffbe6ac Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 13 Jan 2020 19:58:28 +0000 Subject: 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 --- sysdeps/pthread/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sysdeps/pthread/Makefile') 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 -- cgit v1.2.3