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/seminit.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/seminit.c')
-rw-r--r-- | cpukit/posix/src/seminit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/posix/src/seminit.c b/cpukit/posix/src/seminit.c index 466b2d0a0c..a55a1c4e1b 100644 --- a/cpukit/posix/src/seminit.c +++ b/cpukit/posix/src/seminit.c @@ -47,6 +47,7 @@ int sem_init( if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); + _Objects_Allocator_lock(); status = _POSIX_Semaphore_Create_support( NULL, 0, @@ -54,6 +55,7 @@ int sem_init( value, &the_semaphore ); + _Objects_Allocator_unlock(); if ( status != -1 ) *sem = the_semaphore->Object.id; |