diff --git a/htl/pt-sigmask.c b/htl/pt-sigmask.c index 7b2622c317..e00a3fa4eb 100644 --- a/htl/pt-sigmask.c +++ b/htl/pt-sigmask.c @@ -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); diff --git a/sysdeps/mach/hurd/sigthreadmask.c b/sysdeps/mach/hurd/sigthreadmask.c index d8e928b2a5..9b4f530e11 100644 --- a/sysdeps/mach/hurd/sigthreadmask.c +++ b/sysdeps/mach/hurd/sigthreadmask.c @@ -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);