diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-09-19 00:16:48 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-09-19 00:16:48 +0200 |
commit | 8968cc85b696f305b8afe11c0a753ea1209f7abc (patch) | |
tree | ff19314b49a1741a245720c3739cfe50b5da4dfd /sysdeps/generic | |
parent | 23412596845e219b242a763f333fa60954cad84b (diff) |
Fix pthread_kill and pthread_self visibility from raise
* pthreadP.h: New file.
* sysdeps/generic/pt-kill.c (pthread_kill): Rename to __pthread_kill.
pthread_kill: New strong alias.
* sysdeps/hurd/pt-kill.c: Likewise.
* sysdeps/generic/raise.c: Include <pthreadP.h> instead of <pthread.h>.
Make __pthread_kill and __pthread_self weak.
(raise): Use __pthread_kill and __pthread_self instead of pthread_kill
and pthread_self.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/pt-kill.c | 5 | ||||
-rw-r--r-- | sysdeps/generic/raise.c | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sysdeps/generic/pt-kill.c b/sysdeps/generic/pt-kill.c index 0dfac34..fc83f93 100644 --- a/sysdeps/generic/pt-kill.c +++ b/sysdeps/generic/pt-kill.c @@ -18,10 +18,11 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <pthreadP.h> #include "sig-internal.h" int -pthread_kill (pthread_t tid, int signo) +__pthread_kill (pthread_t tid, int signo) { siginfo_t si; memset (&si, 0, sizeof (si)); @@ -29,4 +30,4 @@ pthread_kill (pthread_t tid, int signo) return pthread_kill_siginfo_np (tid, si); } - +strong_alias (__pthread_kill, pthread_kill) diff --git a/sysdeps/generic/raise.c b/sysdeps/generic/raise.c index f086665..cc18b39 100644 --- a/sysdeps/generic/raise.c +++ b/sysdeps/generic/raise.c @@ -18,12 +18,12 @@ License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <pthread.h> +#include <pthreadP.h> #include <signal.h> #include <unistd.h> -#pragma weak pthread_kill -#pragma weak pthread_self +#pragma weak __pthread_kill +#pragma weak __pthread_self int raise (int signo) { @@ -31,10 +31,10 @@ raise (int signo) "the effect of the raise() function shall be equivalent to calling: pthread_kill(pthread_self(), sig);" */ - if (pthread_kill) + if (__pthread_kill) { int err; - err = pthread_kill (pthread_self (), signo); + err = __pthread_kill (__pthread_self (), signo); if (err) { errno = err; |