summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/cleanuppush.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-10-13 21:37:54 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-10-13 21:37:54 +0000
commit17f1ffbe0f75563ac96cbe541cc5afb38c5d9b6a (patch)
tree715c909c792cc39f1f841991c6a6aff339550681 /cpukit/posix/src/cleanuppush.c
parent2003-10-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-17f1ffbe0f75563ac96cbe541cc5afb38c5d9b6a.tar.bz2
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 '')
-rw-r--r--cpukit/posix/src/cleanuppush.c7
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();
}