summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/semaphorecreatesupp.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/semaphorecreatesupp.c')
-rw-r--r--cpukit/posix/src/semaphorecreatesupp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c
index 54b5b46aee..7751a58c0e 100644
--- a/cpukit/posix/src/semaphorecreatesupp.c
+++ b/cpukit/posix/src/semaphorecreatesupp.c
@@ -56,11 +56,8 @@ int _POSIX_Semaphore_Create_support(
if (pshared != 0)
rtems_set_errno_and_return_minus_one( ENOSYS );
- _Thread_Disable_dispatch();
-
- the_semaphore = _POSIX_Semaphore_Allocate();
+ the_semaphore = _POSIX_Semaphore_Allocate_unprotected();
if ( !the_semaphore ) {
- _Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
@@ -72,7 +69,6 @@ int _POSIX_Semaphore_Create_support(
name = _Workspace_String_duplicate( name_arg, name_len );
if ( !name ) {
_POSIX_Semaphore_Free( the_semaphore );
- _Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
} else {
@@ -120,6 +116,5 @@ int _POSIX_Semaphore_Create_support(
*the_sem = the_semaphore;
- _Thread_Enable_dispatch();
return 0;
}