summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/rtems/tasksimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-01-27 19:28:56 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-01 06:22:19 +0100
commitbf8d4b94793eaf6e8ba1c694fcdb2885d75d61e3 (patch)
tree527838aa6c399ebd3e3e376af48068bf30f08bce /cpukit/include/rtems/rtems/tasksimpl.h
parentscore: Rename _Thread_Get_objects_information() (diff)
downloadrtems-bf8d4b94793eaf6e8ba1c694fcdb2885d75d61e3.tar.bz2
score: Add _Thread_Get_objects_information()
We do not need all the checks if we have a valid indentifier to a thread class object. Using the new _Thread_Get_objects_information() instead of the inline function _Thread_Get_objects_information_by_id() avoids dead code since the identifier in a thread control is always valid and the return NULL path in _Thread_Get_objects_information_by_id() would be dead code. The _Thread_Get_objects_information_by_id() should be an inline function since it is used by _Thread_Get() and thus performance critical. Static analyzers which cannot derive that the identifier in a thread control is always valid, may find a potential NULL pointer access (or otherwise find dead code). The identifier in an object control is always valid, see _Objects_Initialize_information() and _Objects_Extend_information(). Move _RTEMS_tasks_Free() to the only source file which calls this function.
Diffstat (limited to 'cpukit/include/rtems/rtems/tasksimpl.h')
-rw-r--r--cpukit/include/rtems/rtems/tasksimpl.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/cpukit/include/rtems/rtems/tasksimpl.h b/cpukit/include/rtems/rtems/tasksimpl.h
index eac4647897..62a618b635 100644
--- a/cpukit/include/rtems/rtems/tasksimpl.h
+++ b/cpukit/include/rtems/rtems/tasksimpl.h
@@ -67,22 +67,6 @@ RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void)
}
/**
- * @brief Frees a task control block.
- *
- * This routine frees a task control block to the
- * inactive chain of free task control blocks.
- */
-RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
- Thread_Control *the_task
-)
-{
- _Objects_Free(
- _Objects_Get_information_id( the_task->Object.id ),
- &the_task->Object
- );
-}
-
-/**
* @brief Converts the RTEMS API priority to the corresponding SuperCore
* priority and validates it.
*