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/include/rtems/rtems/tasksimpl.h | |
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/include/rtems/rtems/tasksimpl.h')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/tasksimpl.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/tasksimpl.h b/cpukit/rtems/include/rtems/rtems/tasksimpl.h index 2a99812e26..c86d5914c2 100644 --- a/cpukit/rtems/include/rtems/rtems/tasksimpl.h +++ b/cpukit/rtems/include/rtems/rtems/tasksimpl.h @@ -77,17 +77,14 @@ void _RTEMS_Tasks_Invoke_task_variable_dtor( rtems_task_variable_t *tvp ); -/** - * @brief Allocates a task control block. - * - * This function allocates a task control block from - * the inactive chain of free task control blocks. - */ -RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void ) +RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void) { + _Objects_Allocator_lock(); + _Thread_Kill_zombies(); - return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information ); + return (Thread_Control *) + _Objects_Allocate_unprotected( &_RTEMS_tasks_Information ); } /** |