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/rtems/src/taskcreate.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/rtems/src/taskcreate.c')
-rw-r--r-- | cpukit/rtems/src/taskcreate.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cpukit/rtems/src/taskcreate.c b/cpukit/rtems/src/taskcreate.c index ae4e1883e4..35dd37c4e5 100644 --- a/cpukit/rtems/src/taskcreate.c +++ b/cpukit/rtems/src/taskcreate.c @@ -105,11 +105,6 @@ rtems_status_code rtems_task_create( */ /* - * Lock the allocator mutex for protection - */ - _RTEMS_Lock_allocator(); - - /* * Allocate the thread control block and -- if the task is global -- * allocate a global object control block. * @@ -122,7 +117,7 @@ rtems_status_code rtems_task_create( the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { - _RTEMS_Unlock_allocator(); + _Objects_Allocator_unlock(); return RTEMS_TOO_MANY; } @@ -132,7 +127,7 @@ rtems_status_code rtems_task_create( if ( _Objects_MP_Is_null_global_object( the_global_object ) ) { _RTEMS_tasks_Free( the_thread ); - _RTEMS_Unlock_allocator(); + _Objects_Allocator_unlock(); return RTEMS_TOO_MANY; } } @@ -164,7 +159,7 @@ rtems_status_code rtems_task_create( _Objects_MP_Free_global_object( the_global_object ); #endif _RTEMS_tasks_Free( the_thread ); - _RTEMS_Unlock_allocator(); + _Objects_Allocator_unlock(); return RTEMS_UNSATISFIED; } @@ -195,6 +190,6 @@ rtems_status_code rtems_task_create( } #endif - _RTEMS_Unlock_allocator(); + _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } |