aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-06-02 10:34:55 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-06-02 11:59:18 +0200
commitec41af45a6d25f70f9c7ea15cb831a2b2fea3855 (patch)
tree485ea3129bf12117c40b6784807869564fc8af1e /sysdeps/nptl
parent7538d461134bf306e31b40e4032f0c225bb40d51 (diff)
downloadglibc-ec41af45a6d25f70f9c7ea15cb831a2b2fea3855.zip
glibc-ec41af45a6d25f70f9c7ea15cb831a2b2fea3855.tar.gz
glibc-ec41af45a6d25f70f9c7ea15cb831a2b2fea3855.tar.bz2
nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np
Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/internaltypes.h3
-rw-r--r--sysdeps/nptl/pthread.h15
2 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/nptl/internaltypes.h b/sysdeps/nptl/internaltypes.h
index ca57c31..65584cb 100644
--- a/sysdeps/nptl/internaltypes.h
+++ b/sysdeps/nptl/internaltypes.h
@@ -65,6 +65,9 @@ struct pthread_attr_extension
/* Affinity map. */
cpu_set_t *cpuset;
size_t cpusetsize;
+
+ sigset_t sigmask;
+ bool sigmask_set;
};
/* Mutex attribute data structure. */
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index 44dd707..8a403cb 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -27,6 +27,7 @@
#include <bits/setjmp.h>
#include <bits/wordsize.h>
#include <bits/types/struct_timespec.h>
+#include <bits/types/__sigset_t.h>
/* 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)