summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthread.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-13 16:42:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-13 16:42:21 +0000
commitb85649c47b1510c981fece87d9b27c8534717ab0 (patch)
treecd44cd8238c1e46b583dc1c2839cb880678ac67a /cpukit/posix/src/pthread.c
parentadded prototype for manager initialization routine. (diff)
downloadrtems-b85649c47b1510c981fece87d9b27c8534717ab0.tar.bz2
basic test cases for kill() and alarm().
kill() in particular needs more test cases for full coverage. The search for a thread interested in this signal has a lot of paths.
Diffstat (limited to 'cpukit/posix/src/pthread.c')
-rw-r--r--cpukit/posix/src/pthread.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 957c2a717e..dd8027c4f2 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -117,6 +117,7 @@ boolean _POSIX_Threads_Create_extension(
created->API_Extensions[ THREAD_API_POSIX ] = api;
+ /* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
@@ -124,6 +125,18 @@ boolean _POSIX_Threads_Create_extension(
api->schedparam.sched_priority =
_POSIX_Priority_From_core( created->current_priority );
+ /*
+ * If the thread is not a posix thread, then all posix signals are blocked
+ * by default.
+ */
+
+ /* XXX use signal constants */
+ api->signals_pending = 0;
+ if ( _Objects_Get_class( created->Object.id ) == OBJECTS_POSIX_THREADS )
+ api->signals_blocked = 0;
+ else
+ api->signals_blocked = 0xffffffff;
+
/* XXX set signal parameters -- block all signals for non-posix threads */
_Thread_queue_Initialize(