add membarrier syscall wrapper, refactor dynamic tls install to use it
authorRich Felker <dalias@aerifal.cx>
Fri, 22 Feb 2019 07:56:10 +0000 (02:56 -0500)
committerRich Felker <dalias@aerifal.cx>
Fri, 22 Feb 2019 08:25:39 +0000 (03:25 -0500)
commitba18c1ecc6a18203ad8496791154af86f706f632
treed1e407e0b4f3fbe9e4463e66c960473112159981
parent7865d569de7b29dd90b94b5680ec7a2a86ed27af
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.
include/sys/membarrier.h [new file with mode: 0644]
ldso/dynlink.c
src/include/sys/membarrier.h [new file with mode: 0644]
src/internal/pthread_impl.h
src/linux/membarrier.c [new file with mode: 0644]
src/thread/pthread_create.c