summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/keycreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/keycreate.c')
-rw-r--r--cpukit/posix/src/keycreate.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c
index a7f6c915cc..245ac9e3f3 100644
--- a/cpukit/posix/src/keycreate.c
+++ b/cpukit/posix/src/keycreate.c
@@ -38,18 +38,16 @@ int pthread_key_create(
{
POSIX_Keys_Control *the_key;
- _Thread_Disable_dispatch();
-
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return EAGAIN;
}
the_key->destructor = destructor;
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return 0;
}