From 44a56b7d9a229b18b9f9886888eb344ee3f1ff99 Mon Sep 17 00:00:00 2001 From: bje Date: Fri, 24 Jul 1998 12:06:28 +0000 Subject: 1998-07-24 Ben Elliston * pthread.h (SIG_BLOCK): Define if not already defined. (SIG_UNBLOCK): Likewise. (SIG_SETMASK): Likewise. (pthread_attr_t): Add signal mask member. (pthread_sigmask): Add function prototype. * signal.c (pthread_sigmask): Implement. * create.c: #include to get a prototype for memcpy(). (pthread_create): New threads inherit their creator's signal mask. Copy the signal mask to the new thread structure. --- create.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'create.c') diff --git a/create.c b/create.c index 45b1570..e8fd1c1 100644 --- a/create.c +++ b/create.c @@ -8,6 +8,8 @@ #include #include +#include + #include "pthread.h" #include "implement.h" @@ -84,6 +86,7 @@ pthread_create(pthread_t *thread, attr_copy->canceltype = attr->canceltype; attr_copy->detached = attr->detached; attr_copy->priority = attr->priority; + memcpy(attr_copy.sigmask, attr.sigmask, sizeof(sigset_t)); } /* Start running, not suspended. */ -- cgit v1.2.3