diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-10-13 21:37:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-10-13 21:37:54 +0000 |
commit | 17f1ffbe0f75563ac96cbe541cc5afb38c5d9b6a (patch) | |
tree | 715c909c792cc39f1f841991c6a6aff339550681 /cpukit/posix/src/cleanuppush.c | |
parent | 67113c7655f2bb48f1a3b856f24195eb3077ded4 (diff) |
2003-10-13 Joel Sherrill <joel@OARcorp.com>
* src/cleanuppop.c, src/cleanuppush.c: Protect use of
_Workspace_Allocate and _Workspec_Free.
Diffstat (limited to 'cpukit/posix/src/cleanuppush.c')
-rw-r--r-- | cpukit/posix/src/cleanuppush.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/posix/src/cleanuppush.c b/cpukit/posix/src/cleanuppush.c index bf96212d8f..80193749e6 100644 --- a/cpukit/posix/src/cleanuppush.c +++ b/cpukit/posix/src/cleanuppush.c @@ -35,10 +35,13 @@ void pthread_cleanup_push( if ( !routine ) return; /* XXX what to do really? */ + _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); - if ( !handler ) + if ( !handler ) { + _Thread_Enable_dispatch(); return; /* XXX what to do really? */ + } thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; @@ -48,4 +51,6 @@ void pthread_cleanup_push( handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); + + _Thread_Enable_dispatch(); } |