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.
This commit is contained in:
Joel Sherrill
1999-10-25 16:05:34 +00:00
parent 4e69f5b79e
commit b6c868e445
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -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.
+8
View File
@@ -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.