From 1bcd0183157e393bf21b3740da46d30d4ad9c1e8 Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Sun, 3 Jul 2016 19:59:34 +0000 Subject: [PATCH] cvs-libpthread_build commit 75b1f41bac0b70d9f87fbafde7cb94b9da3607c1 Author: Samuel Thibault Date: Thu Aug 20 23:30:14 2015 +0200 Fix raise.c build * sysdeps/generic/raise.c: Include instead of non-existing "sig-internal.h" commit 42889b484ae0cae466a63e13e25a117094732e75 Author: Samuel Thibault Date: Thu Aug 20 23:50:47 2015 +0200 Drop debugging statements * sysdeps/generic/raise.c (raise): Do not call debug. commit 8ffa76b6e9af0df8531278f15aa6301b1b5ba76f Author: Samuel Thibault Date: Thu Aug 20 23:57:54 2015 +0200 Fix raise thread-aware implementation * sysdeps/generic/raise.c (pthread_kill): Make ref weak. (raise): Only call pthread_kill when it is not NULL. Call kill otherwise. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name cvs-libpthread_build.diff --- libpthread/sysdeps/generic/raise.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libpthread/sysdeps/generic/raise.c b/libpthread/sysdeps/generic/raise.c index 410f557d7..15348ce16 100644 --- a/libpthread/sysdeps/generic/raise.c +++ b/libpthread/sysdeps/generic/raise.c @@ -18,8 +18,10 @@ License along with this program. If not, see . */ -#include "sig-internal.h" +#include +#pragma weak pthread_kill +#pragma weak pthread_self int raise (int signo) { @@ -27,9 +29,11 @@ raise (int signo) "the effect of the raise() function shall be equivalent to calling: pthread_kill(pthread_self(), sig);" */ -debug (0, ""); - int err = pthread_kill (pthread_self (), signo); -debug (0, ""); + int err; + if (pthread_kill) + err = pthread_kill (pthread_self (), signo); + else + err = __kill (__getpid (), signo); if (err) { errno = err; -- 2.30.2