From ec41af45a6d25f70f9c7ea15cb831a2b2fea3855 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 2 Jun 2020 10:34:55 +0200 Subject: nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/nptl/pthread.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sysdeps/nptl/pthread.h') diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h index 44dd707896..8a403cbf36 100644 --- a/sysdeps/nptl/pthread.h +++ b/sysdeps/nptl/pthread.h @@ -27,6 +27,7 @@ #include #include #include +#include /* Detach state. */ @@ -385,6 +386,20 @@ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, extern int pthread_getattr_default_np (pthread_attr_t *__attr) __THROW __nonnull ((1)); +/* Store *SIGMASK as the signal mask for the new thread in *ATTR. */ +extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr, + const __sigset_t *sigmask); + +/* Store the signal mask of *ATTR in *SIGMASK. If there is no signal + mask stored, return PTHREAD_ATTR_NOSIGMASK_NP. Return zero on + success. */ +extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr, + __sigset_t *sigmask); + +/* Special return value from pthread_attr_getsigmask_np if the signal + mask has not been set. */ +#define PTHREAD_ATTR_NO_SIGMASK_NP (-1) + /* Set the default attributes to be used by pthread_create in this process. */ extern int pthread_setattr_default_np (const pthread_attr_t *__attr) -- cgit 1.4.1