diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-12-07 16:21:55 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-09 15:16:45 -0300 |
commit | f779b1efb35fe141e47952af3ac7f0540acca401 (patch) | |
tree | c85d1e5a2b7f93048159938802f187d98a1b8d09 /sysdeps/htl | |
parent | 8c1c0aae2079039a629b15098d78f3d11aabefb4 (diff) | |
download | glibc-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 'sysdeps/htl')
-rw-r--r-- | sysdeps/htl/pthreadP.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 8e2cf2ce65..3b357b7bdc 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -31,8 +31,6 @@ extern void __pthread_init_static_tls (struct link_map *) attribute_hidden; /* These represent the interface used by glibc itself. */ -extern pthread_t __pthread_self (void); -extern int __pthread_kill (pthread_t threadid, int signo); extern struct __pthread **__pthread_threads; extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__attr); |