about summary refs log tree commit diff
path: root/nptl/Makefile
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-12-07 16:21:55 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-09 15:16:45 -0300
commitf779b1efb35fe141e47952af3ac7f0540acca401 (patch)
treec85d1e5a2b7f93048159938802f187d98a1b8d09 /nptl/Makefile
parent8c1c0aae2079039a629b15098d78f3d11aabefb4 (diff)
downloadglibc-f779b1efb35fe141e47952af3ac7f0540acca401.tar.gz
glibc-f779b1efb35fe141e47952af3ac7f0540acca401.tar.xz
glibc-f779b1efb35fe141e47952af3ac7f0540acca401.zip
nptl: Implement raise in terms of pthread_kill
Now that pthread_kill is provided by libc.so it is possible to
implement the generic POSIX implementation as
'pthread_kill(pthread_self(), sig)'.

For Linux implementation, pthread_kill read the targeting TID from
the TCB.  For raise, this it not possible because it would make raise
fail when issue after vfork (where creates the resulting process
has a different TID from the parent, but its TCB is not updated as
for pthread_create).  To make raise use pthread_kill, it is make
usable from vfork by getting the target thread id through gettid
syscall.

Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Diffstat (limited to 'nptl/Makefile')
-rw-r--r--nptl/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index f7d7a2c7e2..3e6cf0c21b 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -251,6 +251,7 @@ CFLAGS-pthread_clockjoin.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-pthread_once.c += $(uses-callbacks) -fexceptions \
 			-fasynchronous-unwind-tables
 CFLAGS-pthread_cond_wait.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-pthread_kill.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sem_wait.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sem_timedwait.c += -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sem_clockwait.c = -fexceptions -fasynchronous-unwind-tables