diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-27 14:16:12 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-31 08:29:44 +0200 |
commit | 23fec9f0e18dc4913fab818118f836af150b98f3 (patch) | |
tree | 66228f23bbf654117a33e28db7a017eea21fb785 /cpukit/posix/src/semaphorecreatesupp.c | |
parent | score: Use thread life protection for API mutexes (diff) | |
download | rtems-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.c | 7 |
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; } |