From ba18c1ecc6a18203ad8496791154af86f706f632 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 22 Feb 2019 02:56:10 -0500 Subject: add membarrier syscall wrapper, refactor dynamic tls install to use it the motivation for this change is twofold. first, it gets the fallback logic out of the dynamic linker, improving code readability and organization. second, it provides application code that wants to use the membarrier syscall, which depends on preregistration of intent before the process becomes multithreaded unless unbounded latency is acceptable, with a symbol that, when linked, ensures that this registration happens. --- src/include/sys/membarrier.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/include/sys/membarrier.h (limited to 'src/include') diff --git a/src/include/sys/membarrier.h b/src/include/sys/membarrier.h new file mode 100644 index 00000000..3654491c --- /dev/null +++ b/src/include/sys/membarrier.h @@ -0,0 +1,9 @@ +#ifndef SYS_MEMBARRIER_H +#define SYS_MEMBARRIER_H + +#include "../../../include/sys/membarrier.h" +#include + +hidden int __membarrier(int, int); + +#endif -- cgit v1.2.1