mirror of
https://sourceware.org/git/glibc.git
synced 2026-10-24 01:33:52 +03:00
htl: Make __pthread_sigmask directly call __sigthreadmask
If no thread was created yet, __pthread_sigstate will not find our ss because self->kernel_thread is still nul, and then change the global sigstate instead of our sigstate! We can directly call __sigthreadmask and skip the (bogus) lookup step.
This commit is contained in:
@@ -19,15 +19,14 @@
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <shlib-compat.h>
|
||||
#include <hurd/signal.h>
|
||||
#include <pt-internal.h>
|
||||
|
||||
int
|
||||
__pthread_sigmask (int how, const sigset_t *set, sigset_t *oset)
|
||||
{
|
||||
struct __pthread *self = _pthread_self ();
|
||||
|
||||
/* Do not clear SELF's pending signals. */
|
||||
return __pthread_sigstate (self, how, set, oset, 0);
|
||||
return __sigthreadmask (_hurd_self_sigstate (), how, set, oset, 0);
|
||||
}
|
||||
libc_hidden_def (__pthread_sigmask)
|
||||
versioned_symbol (libc, __pthread_sigmask, pthread_sigmask, GLIBC_2_41);
|
||||
|
||||
@@ -36,6 +36,8 @@ __sigthreadmask (struct hurd_sigstate *ss, int how,
|
||||
new = *set;
|
||||
|
||||
assert (ss);
|
||||
/* We are not supposed to change the global blocked state */
|
||||
assert (ss != _hurd_global_sigstate);
|
||||
|
||||
_hurd_sigstate_lock (ss);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user