mirror of
git://git.musl-libc.org/musl
synced 2025-01-03 21:12:03 +00:00
optimize raise not to make a syscall for getting tid
assuming signals are blocked, which they are here, the tid in the thread structure is always valid and cannot change out from under us.
This commit is contained in:
parent
cff4b910ab
commit
0b4c92b7ac
@ -5,11 +5,9 @@
|
||||
|
||||
int raise(int sig)
|
||||
{
|
||||
int tid, ret;
|
||||
sigset_t set;
|
||||
__block_app_sigs(&set);
|
||||
tid = __syscall(SYS_gettid);
|
||||
ret = syscall(SYS_tkill, tid, sig);
|
||||
int ret = syscall(SYS_tkill, __pthread_self()->tid, sig);
|
||||
__restore_sigs(&set);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user