summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/semaphorecreatesupp.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-27 14:16:12 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-31 08:29:44 +0200
commit23fec9f0e18dc4913fab818118f836af150b98f3 (patch)
tree66228f23bbf654117a33e28db7a017eea21fb785 /cpukit/posix/src/semaphorecreatesupp.c
parentscore: Use thread life protection for API mutexes (diff)
downloadrtems-23fec9f0e18dc4913fab818118f836af150b98f3.tar.bz2
score: PR2152: Use allocator mutex for objects
Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.
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;
}