[PATCH v5 2/5] nptl: Add __raise_direct

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Feb 3 15:36:15 GMT 2026



On 30/01/26 14:07, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> diff --git a/signal/raise.c b/signal/raise.c
>> index b6f5cbee4e..86d3968e19 100644
>> --- a/signal/raise.c
>> +++ b/signal/raise.c
>> @@ -26,6 +26,7 @@ raise (int sig)
>>    return -1;
>>  }
>>  weak_alias (raise, gsignal)
>> +weak_alias (raise, __raise_direct)
>>  
>>  stub_warning (raise)
>>  stub_warning (gsignal)
>> diff --git a/sysdeps/htl/raise.c b/sysdeps/htl/raise.c
>> index 3200f91634..78600a59c6 100644
>> --- a/sysdeps/htl/raise.c
>> +++ b/sysdeps/htl/raise.c
>> @@ -51,6 +51,7 @@ raise (int signo)
>>    else
>>      return __kill (__getpid (), signo);
>>  }
>> +weak_alias (raise, __raise_direct)
>>  
>>  libc_hidden_def (raise)
>>  weak_alias (raise, gsignal)
>> diff --git a/sysdeps/posix/raise.c b/sysdeps/posix/raise.c
>> index 8abe8d4cad..cf0770f1c8 100644
>> --- a/sysdeps/posix/raise.c
>> +++ b/sysdeps/posix/raise.c
>> @@ -23,7 +23,7 @@
>>  int
>>  raise (int sig)
>>  {
>> -  int ret = __pthread_kill (__pthread_self (), sig);
>> +  int ret = __raise_direct (sig);
>>    if (ret != 0)
>>      {
>>        __set_errno (ret);
> 
> These aren't compatible.  The POSIX raise may set errno to -1 on
> failure.

Right, I will fix it for the generic.  I will add a TODO for Hurd because
I am not fully sure what would be a simpler solution (its kill.c
implementation is quite complex).


More information about the Libc-alpha mailing list