diff options
author | rpj <rpj> | 2005-05-06 07:31:28 +0000 |
---|---|---|
committer | rpj <rpj> | 2005-05-06 07:31:28 +0000 |
commit | 78f83cfa240ec14874b22c7302ff8d306c130aaf (patch) | |
tree | bf29a117aecb99e9ecb2d30bad398d8b20392b49 /create.c | |
parent | e3845d9b6b0a18ffdfdf0cefd811a17fce62f1ac (diff) |
''
Diffstat (limited to 'create.c')
-rw-r--r-- | create.c | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -92,6 +92,7 @@ pthread_create (pthread_t * tid, ThreadParms *parms = NULL; long stackSize; int priority; + pthread_t self; /* * Before doing anything, check that tid can be stored through @@ -128,18 +129,23 @@ pthread_create (pthread_t * tid, parms->start = start; parms->arg = arg; +#if defined(HAVE_SIGSET_T) + + /* + * Threads inherit their initial sigmask from their creator thread. + */ + self = pthread_self(); + tp->sigmask = ((ptw32_thread_t *)self.p)->sigmask; + +#endif /* HAVE_SIGSET_T */ + + if (a != NULL) { stackSize = a->stacksize; tp->detachState = a->detachstate; priority = a->param.sched_priority; -#if HAVE_SIGSET_T - - tp->sigmask = a->sigmask; - -#endif /* HAVE_SIGSET_T */ - #if (THREAD_PRIORITY_LOWEST > THREAD_PRIORITY_NORMAL) /* WinCE */ #else @@ -164,7 +170,9 @@ pthread_create (pthread_t * tid, * then the inherited priority could be the result of a temporary * system adjustment. This is not the case for POSIX threads. */ - pthread_t self = pthread_self (); +#if ! defined(HAVE_SIGSET_T) + self = pthread_self (); +#endif priority = ((ptw32_thread_t *) self.p)->sched_priority; } |