summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pspininit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/pspininit.c')
-rw-r--r--cpukit/posix/src/pspininit.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/cpukit/posix/src/pspininit.c b/cpukit/posix/src/pspininit.c
index 6030ed00e5..02b07c8468 100644
--- a/cpukit/posix/src/pspininit.c
+++ b/cpukit/posix/src/pspininit.c
@@ -49,7 +49,6 @@ int pthread_spin_init(
POSIX_Spinlock_Control *the_spinlock;
CORE_spinlock_Attributes attributes;
-
if ( !spinlock )
return EINVAL;
@@ -61,12 +60,10 @@ int pthread_spin_init(
return EINVAL;
}
- _Thread_Disable_dispatch(); /* prevents deletion */
-
the_spinlock = _POSIX_Spinlock_Allocate();
if ( !the_spinlock ) {
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return EAGAIN;
}
@@ -78,6 +75,6 @@ int pthread_spin_init(
*spinlock = the_spinlock->Object.id;
- _Thread_Enable_dispatch();
+ _Objects_Allocator_unlock();
return 0;
}