summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-25 16:05:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-25 16:05:34 +0000
commitb6c868e44558c6467f842814750506503a2453c2 (patch)
treef6eaf1240842fae2a4029fcfce746615819f1325 /c/src/exec/posix
parentAdded notes for new test. (diff)
downloadrtems-b6c868e44558c6467f842814750506503a2453c2.tar.bz2
Patch from Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>
to initialize the pthread cancellation fields. This is a patch to _POSIX_Threads_Create_extension that fixes the problem.
Diffstat (limited to 'c/src/exec/posix')
-rw-r--r--c/src/exec/posix/src/pthread.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c
index 2a529ba49a..49f6273a71 100644
--- a/c/src/exec/posix/src/pthread.c
+++ b/c/src/exec/posix/src/pthread.c
@@ -148,6 +148,14 @@ boolean _POSIX_Threads_Create_extension(
api->schedparam.sched_priority =
_POSIX_Priority_From_core( created->current_priority );
+ /*
+ * POSIX 1003.1 1996, 18.2.2.2
+ */
+ api->cancelation_requested = 0;
+ api->cancelability_state = PTHREAD_CANCEL_ENABLE;
+ api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
+ _Chain_Initialize_empty (&api->Cancellation_Handlers);
+
/*
* If the thread is not a posix thread, then all posix signals are blocked
* by default.