From 3c20a679b6e31af07542e56a446e2433fba53a7e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 27 Jun 2017 10:49:51 -0300 Subject: nptl: Add C11 threads call_once functions This patch adds the call_* definitions from C11 threads (ISO/IEC 9899:2011), more specifically call_once and required types. Mostly of the definitions are composed based on POSIX conterparts,including once_flag (pthread_once_t). The idea is to make possible to share POSIX internal implementations for mostly of the code (and making adjustment only when required). Checked with a build for all major ABI (aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabi, i386-linux-gnu, ia64-linux-gnu, m68k-linux-gnu, microblaze-linux-gnu [1], mips{64}-linux-gnu, nios2-linux-gnu, powerpc{64le}-linux-gnu, s390{x}-linux-gnu, sparc{64}-linux-gnu, and x86_64-linux-gnu). Also ran a full check on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, arm-linux-gnueabhf, and powerpc64le-linux-gnu. [BZ #14092] * conform/data/threads.h-data (ONCE_FLAG_INIT): New macro. (once_flag): New type. (call_once): New function. * nptl/Makefile (libpthread-routines): Add call_once object. * nptl/Versions (libphread) [GLIBC_2.28]: Add call_once symbol. * nptl/call_once.c: New file. * sysdeps/nptl/threads.h (ONCE_FLAG_INIT): New define. (once_flag): New type. (call_once): New prototype. --- nptl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nptl/Makefile') diff --git a/nptl/Makefile b/nptl/Makefile index 4b889ab04e..d55d24b09a 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -143,7 +143,7 @@ libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \ pthread_setattr_default_np pthread_getattr_default_np \ thrd_create thrd_detach thrd_exit thrd_join \ mtx_destroy mtx_init mtx_lock mtx_timedlock \ - mtx_trylock mtx_unlock + mtx_trylock mtx_unlock call_once # pthread_setuid pthread_seteuid pthread_setreuid \ # pthread_setresuid \ # pthread_setgid pthread_setegid pthread_setregid \ -- cgit v1.2.3