summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/threadimpl.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/score/threadimpl.h250
1 files changed, 141 insertions, 109 deletions
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h
index 10800aa023..36ddb785e9 100644
--- a/cpukit/include/rtems/score/threadimpl.h
+++ b/cpukit/include/rtems/score/threadimpl.h
@@ -13,7 +13,7 @@
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2014, 2017 embedded brains GmbH.
+ * Copyright (C) 2014, 2017 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -380,15 +380,23 @@ RTEMS_NO_RETURN void _Thread_Exit(
);
/**
- * @brief Joins the currently executing thread with the given thread to wait
- * for.
+ * @brief Joins the currently executing thread with the thread.
*
- * @param[in, out] the_thread The thread to wait for.
- * @param waiting_for_join The states control for the join.
- * @param[in, out] executing The currently executing thread.
- * @param queue_context The thread queue context.
+ * @param[in, out] the_thread is the thread to join.
+ *
+ * @param waiting_for_join is the thread state for the currently executing
+ * thread.
+ *
+ * @param[in, out] executing is the currently executing thread.
+ *
+ * @param queue_context[in, out] is the thread queue context. The caller shall
+ * have acquired the thread state lock using the thread queue context.
+ *
+ * @retval STATUS_SUCCESSFUL The operation was successful.
+ *
+ * @retval STATUS_DEADLOCK A deadlock occurred.
*/
-void _Thread_Join(
+Status_Control _Thread_Join(
Thread_Control *the_thread,
States_Control waiting_for_join,
Thread_Control *executing,
@@ -396,23 +404,38 @@ void _Thread_Join(
);
/**
+ * @brief Indicates the resulting state of _Thread_Cancel().
+ */
+typedef enum {
+ /**
+ * @brief Indicates that the thread cancel operation is done.
+ */
+ THREAD_CANCEL_DONE,
+
+ /**
+ * @brief Indicates that the thread cancel operation is in progress.
+ *
+ * The cancelled thread is terminating. It may be joined.
+ */
+ THREAD_CANCEL_IN_PROGRESS
+} Thread_Cancel_state;
+
+/**
* @brief Cancels the thread.
*
- * @param[in, out] the_thread The thread to cancel.
- * @param executing The currently executing thread.
- * @param exit_value The exit value for the thread.
+ * @param[in, out] the_thread is the thread to cancel.
+
+ * @param[in, out] executing is the currently executing thread.
+
+ * @param[in, out] life_states_to_clear is the set of thread life states to
+ * clear for the thread to cancel.
*/
-void _Thread_Cancel(
- Thread_Control *the_thread,
- Thread_Control *executing,
- void *exit_value
+Thread_Cancel_state _Thread_Cancel(
+ Thread_Control *the_thread,
+ Thread_Control *executing,
+ Thread_Life_state life_states_to_clear
);
-typedef struct {
- Thread_queue_Context Base;
- Thread_Control *cancel;
-} Thread_Close_context;
-
/**
* @brief Closes the thread.
*
@@ -420,14 +443,21 @@ typedef struct {
* case the executing thread is not terminated, then this function waits until
* the terminating thread reached the zombie state.
*
- * @param the_thread The thread to close.
- * @param executing The currently executing thread.
- * @param[in, out] context The thread close context.
+ * @param the_thread is the thread to close.
+ *
+ * @param[in, out] executing is the currently executing thread.
+ *
+ * @param[in, out] queue_context is the thread queue context. The caller shall
+ * have disabled interrupts using the thread queue context.
+ *
+ * @retval STATUS_SUCCESSFUL The operation was successful.
+ *
+ * @retval STATUS_DEADLOCK A deadlock occurred.
*/
-void _Thread_Close(
+Status_Control _Thread_Close(
Thread_Control *the_thread,
Thread_Control *executing,
- Thread_Close_context *context
+ Thread_queue_Context *queue_context
);
/**
@@ -438,7 +468,7 @@ void _Thread_Close(
* @retval true The thread is currently in the ready state.
* @retval false The thread is currently not ready.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_ready( const Thread_Control *the_thread )
+static inline bool _Thread_Is_ready( const Thread_Control *the_thread )
{
return _States_Is_ready( the_thread->current_state );
}
@@ -565,7 +595,7 @@ void _Thread_Handler( void );
* @param the_thread The thread to acquire the lock context.
* @param lock_context The lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_State_acquire_critical(
+static inline void _Thread_State_acquire_critical(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -579,7 +609,7 @@ RTEMS_INLINE_ROUTINE void _Thread_State_acquire_critical(
* @param the_thread The thread to acquire the lock context.
* @param lock_context The lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_State_acquire(
+static inline void _Thread_State_acquire(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -596,7 +626,7 @@ RTEMS_INLINE_ROUTINE void _Thread_State_acquire(
*
* @return The currently executing thread.
*/
-RTEMS_INLINE_ROUTINE Thread_Control *_Thread_State_acquire_for_executing(
+static inline Thread_Control *_Thread_State_acquire_for_executing(
ISR_lock_Context *lock_context
)
{
@@ -615,7 +645,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_State_acquire_for_executing(
* @param the_thread The thread to release the lock context.
* @param lock_context The lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_State_release_critical(
+static inline void _Thread_State_release_critical(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -629,7 +659,7 @@ RTEMS_INLINE_ROUTINE void _Thread_State_release_critical(
* @param[in, out] the_thread The thread to release the lock context.
* @param[out] lock_context The lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_State_release(
+static inline void _Thread_State_release(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -647,7 +677,7 @@ RTEMS_INLINE_ROUTINE void _Thread_State_release(
* @retval false The thread is not owner of the lock of the join queue.
*/
#if defined(RTEMS_DEBUG)
-RTEMS_INLINE_ROUTINE bool _Thread_State_is_owner(
+static inline bool _Thread_State_is_owner(
const Thread_Control *the_thread
)
{
@@ -761,7 +791,7 @@ void _Thread_Priority_changed(
*
* @see _Thread_Wait_acquire().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Priority_change(
+static inline void _Thread_Priority_change(
Thread_Control *the_thread,
Priority_Node *priority_node,
Priority_Control new_priority,
@@ -778,6 +808,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Priority_change(
);
}
+#if defined(RTEMS_SMP)
/**
* @brief Replaces the victim priority node with the replacement priority node
* in the corresponding thread priority aggregation.
@@ -795,6 +826,7 @@ void _Thread_Priority_replace(
Priority_Node *victim_node,
Priority_Node *replacement_node
);
+#endif
/**
* @brief Updates the priority of all threads in the set
@@ -844,7 +876,7 @@ void _Thread_Priority_update_ignore_sticky( Thread_Control *the_thread );
* @retval true The left priority is less in the intuitive sense.
* @retval false The left priority is greater or equal in the intuitive sense.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Priority_less_than(
+static inline bool _Thread_Priority_less_than(
Priority_Control left,
Priority_Control right
)
@@ -861,7 +893,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Priority_less_than(
*
* @return The highest priority in the intuitive sense of priority.
*/
-RTEMS_INLINE_ROUTINE Priority_Control _Thread_Priority_highest(
+static inline Priority_Control _Thread_Priority_highest(
Priority_Control left,
Priority_Control right
)
@@ -881,7 +913,7 @@ RTEMS_INLINE_ROUTINE Priority_Control _Thread_Priority_highest(
* @return Returns the thread object information associated with the API of the
* object identifier.
*/
-RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information_by_id(
+static inline Objects_Information *_Thread_Get_objects_information_by_id(
Objects_Id id
)
{
@@ -909,7 +941,7 @@ RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information_by_id(
*
* @return Returns the thread object information of the thread.
*/
-RTEMS_INLINE_ROUTINE Thread_Information *_Thread_Get_objects_information(
+static inline Thread_Information *_Thread_Get_objects_information(
Thread_Control *the_thread
)
{
@@ -953,7 +985,7 @@ Objects_Id _Thread_Self_id( void );
*
* @return The cpu of the thread's scheduler.
*/
-RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Get_CPU(
+static inline Per_CPU_Control *_Thread_Get_CPU(
const Thread_Control *thread
)
{
@@ -972,7 +1004,7 @@ RTEMS_INLINE_ROUTINE Per_CPU_Control *_Thread_Get_CPU(
* @param[out] thread The thread.
* @param cpu The cpu to set.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Set_CPU(
+static inline void _Thread_Set_CPU(
Thread_Control *thread,
Per_CPU_Control *cpu
)
@@ -996,7 +1028,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Set_CPU(
* @retval true @a the_thread is the currently executing one.
* @retval false @a the_thread is not the currently executing one.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
+static inline bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
@@ -1016,7 +1048,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
* @retval true @a the_thread is the currently executing one.
* @retval false @a the_thread is not the currently executing one.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_on_a_processor(
+static inline bool _Thread_Is_executing_on_a_processor(
const Thread_Control *the_thread
)
{
@@ -1035,7 +1067,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_on_a_processor(
* @retval true @a the_thread is the heir.
* @retval false @a the_thread is not the heir.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
+static inline bool _Thread_Is_heir (
const Thread_Control *the_thread
)
{
@@ -1051,7 +1083,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
*
* @param[in, out] the_thread The thread to unblock.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Unblock (
+static inline void _Thread_Unblock (
Thread_Control *the_thread
)
{
@@ -1074,7 +1106,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Unblock (
* loaded in the floating point unit.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
-RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
+static inline bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
@@ -1100,7 +1132,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
*
* @param executing The currently executing thread.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Save_fp( Thread_Control *executing )
+static inline void _Thread_Save_fp( Thread_Control *executing )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
@@ -1115,7 +1147,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Save_fp( Thread_Control *executing )
*
* @param executing The currently executing thread.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Restore_fp( Thread_Control *executing )
+static inline void _Thread_Restore_fp( Thread_Control *executing )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
@@ -1140,7 +1172,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Restore_fp( Thread_Control *executing )
* point context is now longer associated with an active thread.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
-RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
+static inline void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
}
@@ -1155,7 +1187,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
* @retval true Dispatching is disabled.
* @retval false Dispatching is enabled.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
+static inline bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
}
@@ -1165,7 +1197,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
*
* @return The maximum number of internal threads.
*/
-RTEMS_INLINE_ROUTINE uint32_t _Thread_Get_maximum_internal_threads(void)
+static inline uint32_t _Thread_Get_maximum_internal_threads(void)
{
/* Idle threads */
uint32_t maximum_internal_threads =
@@ -1187,7 +1219,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Thread_Get_maximum_internal_threads(void)
* @retval pointer Pointer to the allocated Thread_Control.
* @retval NULL The operation failed.
*/
-RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void )
+static inline Thread_Control *_Thread_Internal_allocate( void )
{
return (Thread_Control *)
_Objects_Allocate_unprotected( &_Thread_Information.Objects );
@@ -1206,7 +1238,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void )
* @see _Thread_Dispatch(), _Thread_Start_multitasking() and
* _Thread_Dispatch_update_heir().
*/
-RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get_heir_and_make_it_executing(
+static inline Thread_Control *_Thread_Get_heir_and_make_it_executing(
Per_CPU_Control *cpu_self
)
{
@@ -1226,7 +1258,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get_heir_and_make_it_executing(
* used.
* @param cpu The cpu.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Update_CPU_time_used(
+static inline void _Thread_Update_CPU_time_used(
Thread_Control *the_thread,
Per_CPU_Control *cpu
)
@@ -1248,7 +1280,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Update_CPU_time_used(
* @param heir The new heir for @a cpu_for_heir.
*/
#if defined( RTEMS_SMP )
-RTEMS_INLINE_ROUTINE void _Thread_Dispatch_update_heir(
+static inline void _Thread_Dispatch_update_heir(
Per_CPU_Control *cpu_self,
Per_CPU_Control *cpu_for_heir,
Thread_Control *heir
@@ -1305,7 +1337,7 @@ Timestamp_Control _Thread_Get_CPU_time_used_after_last_reset(
*
* @param[out] action_control The action control to initialize.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Action_control_initialize(
+static inline void _Thread_Action_control_initialize(
Thread_Action_control *action_control
)
{
@@ -1317,7 +1349,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Action_control_initialize(
*
* @param[out] action The Thread_Action to initialize.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Action_initialize(
+static inline void _Thread_Action_initialize(
Thread_Action *action
)
{
@@ -1336,7 +1368,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Action_initialize(
*
* @param handler is the handler for the action.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Add_post_switch_action(
+static inline void _Thread_Add_post_switch_action(
Thread_Control *the_thread,
Thread_Action *action,
Thread_Action_handler handler
@@ -1369,7 +1401,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Add_post_switch_action(
*
* @param[in, out] action is the action to add.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Append_post_switch_action(
+static inline void _Thread_Append_post_switch_action(
Thread_Control *the_thread,
Thread_Action *action
)
@@ -1391,7 +1423,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Append_post_switch_action(
* @retval true @a life_state is restarting.
* @retval false @a life_state is not restarting.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_life_restarting(
+static inline bool _Thread_Is_life_restarting(
Thread_Life_state life_state
)
{
@@ -1406,7 +1438,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_restarting(
* @retval true @a life_state is terminating.
* @retval false @a life_state is not terminating.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_life_terminating(
+static inline bool _Thread_Is_life_terminating(
Thread_Life_state life_state
)
{
@@ -1421,7 +1453,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_terminating(
* @retval true @a life_state allows life change.
* @retval false @a life_state does not allow life change.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_life_change_allowed(
+static inline bool _Thread_Is_life_change_allowed(
Thread_Life_state life_state
)
{
@@ -1437,7 +1469,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_change_allowed(
* @retval true @a life_state is life changing.
* @retval false @a life_state is not life changing.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_life_changing(
+static inline bool _Thread_Is_life_changing(
Thread_Life_state life_state
)
{
@@ -1453,7 +1485,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_changing(
* @retval true @a life_state is joinable.
* @retval false @a life_state is not joinable.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Is_joinable(
+static inline bool _Thread_Is_joinable(
const Thread_Control *the_thread
)
{
@@ -1466,7 +1498,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_joinable(
*
* @param[in, out] the_thread The thread to increase the resource count of.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Resource_count_increment(
+static inline void _Thread_Resource_count_increment(
Thread_Control *the_thread
)
{
@@ -1482,7 +1514,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Resource_count_increment(
*
* @param[in, out] the_thread The thread to decrement the resource count of.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Resource_count_decrement(
+static inline void _Thread_Resource_count_decrement(
Thread_Control *the_thread
)
{
@@ -1505,7 +1537,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Resource_count_decrement(
* @retval true The thread owns resources.
* @retval false The thread does not own resources.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Owns_resources(
+static inline bool _Thread_Owns_resources(
const Thread_Control *the_thread
)
{
@@ -1520,7 +1552,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Owns_resources(
*
* @return The thread's home scheduler.
*/
-RTEMS_INLINE_ROUTINE const Scheduler_Control *_Thread_Scheduler_get_home(
+static inline const Scheduler_Control *_Thread_Scheduler_get_home(
const Thread_Control *the_thread
)
{
@@ -1539,7 +1571,7 @@ RTEMS_INLINE_ROUTINE const Scheduler_Control *_Thread_Scheduler_get_home(
*
* @return The thread's home node.
*/
-RTEMS_INLINE_ROUTINE Scheduler_Node *_Thread_Scheduler_get_home_node(
+static inline Scheduler_Node *_Thread_Scheduler_get_home_node(
const Thread_Control *the_thread
)
{
@@ -1561,17 +1593,17 @@ RTEMS_INLINE_ROUTINE Scheduler_Node *_Thread_Scheduler_get_home_node(
*
* @return The scheduler node with the specified index.
*/
-RTEMS_INLINE_ROUTINE Scheduler_Node *_Thread_Scheduler_get_node_by_index(
+static inline Scheduler_Node *_Thread_Scheduler_get_node_by_index(
const Thread_Control *the_thread,
size_t scheduler_index
)
{
+ _Assert( scheduler_index < _Scheduler_Count );
#if defined(RTEMS_SMP)
return (Scheduler_Node *)
( (uintptr_t) the_thread->Scheduler.nodes
+ scheduler_index * _Scheduler_Node_size );
#else
- _Assert( scheduler_index == 0 );
(void) scheduler_index;
return the_thread->Scheduler.nodes;
#endif
@@ -1584,7 +1616,7 @@ RTEMS_INLINE_ROUTINE Scheduler_Node *_Thread_Scheduler_get_node_by_index(
* @param the_thread The thread to acquire the lock context.
* @param lock_context The lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Scheduler_acquire_critical(
+static inline void _Thread_Scheduler_acquire_critical(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -1598,7 +1630,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Scheduler_acquire_critical(
* @param the_thread The thread to release the lock context.
* @param lock_context The lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Scheduler_release_critical(
+static inline void _Thread_Scheduler_release_critical(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -1620,7 +1652,7 @@ void _Thread_Scheduler_process_requests( Thread_Control *the_thread );
* @param[in, out] scheduler_node The scheduler node for the request.
* @param request The request to add.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Scheduler_add_request(
+static inline void _Thread_Scheduler_add_request(
Thread_Control *the_thread,
Scheduler_Node *scheduler_node,
Scheduler_Node_request request
@@ -1663,7 +1695,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Scheduler_add_request(
* @param[in, out] the_thread The thread to add the wait node to.
* @param scheduler_node The scheduler node which provides the wait node.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Scheduler_add_wait_node(
+static inline void _Thread_Scheduler_add_wait_node(
Thread_Control *the_thread,
Scheduler_Node *scheduler_node
)
@@ -1686,7 +1718,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Scheduler_add_wait_node(
* @param the_thread The thread to add the request to remove a wait node.
* @param scheduler_node The scheduler node to remove a wait node from.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Scheduler_remove_wait_node(
+static inline void _Thread_Scheduler_remove_wait_node(
Thread_Control *the_thread,
Scheduler_Node *scheduler_node
)
@@ -1711,7 +1743,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Scheduler_remove_wait_node(
*
* @return The priority of the thread.
*/
-RTEMS_INLINE_ROUTINE Priority_Control _Thread_Get_priority(
+static inline Priority_Control _Thread_Get_priority(
const Thread_Control *the_thread
)
{
@@ -1728,7 +1760,7 @@ RTEMS_INLINE_ROUTINE Priority_Control _Thread_Get_priority(
*
* @return The unmapped priority of the thread.
*/
-RTEMS_INLINE_ROUTINE Priority_Control _Thread_Get_unmapped_priority(
+static inline Priority_Control _Thread_Get_unmapped_priority(
const Thread_Control *the_thread
)
{
@@ -1742,7 +1774,7 @@ RTEMS_INLINE_ROUTINE Priority_Control _Thread_Get_unmapped_priority(
*
* @return The unmapped real priority of the thread.
*/
-RTEMS_INLINE_ROUTINE Priority_Control _Thread_Get_unmapped_real_priority(
+static inline Priority_Control _Thread_Get_unmapped_real_priority(
const Thread_Control *the_thread
)
{
@@ -1759,7 +1791,7 @@ RTEMS_INLINE_ROUTINE Priority_Control _Thread_Get_unmapped_real_priority(
*
* @see _Thread_Wait_release_default_critical().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_default_critical(
+static inline void _Thread_Wait_acquire_default_critical(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -1778,7 +1810,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_default_critical(
*
* @see _Thread_Wait_release_default().
*/
-RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Wait_acquire_default_for_executing(
+static inline Thread_Control *_Thread_Wait_acquire_default_for_executing(
ISR_lock_Context *lock_context
)
{
@@ -1800,7 +1832,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Wait_acquire_default_for_executing(
*
* @see _Thread_Wait_release_default().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_default(
+static inline void _Thread_Wait_acquire_default(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -1819,7 +1851,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_default(
* @param lock_context The lock context used for the corresponding lock
* acquire.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_release_default_critical(
+static inline void _Thread_Wait_release_default_critical(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -1835,7 +1867,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_release_default_critical(
* @param[out] lock_context The lock context used for the corresponding lock
* acquire.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_release_default(
+static inline void _Thread_Wait_release_default(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -1854,7 +1886,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_release_default(
* @param the_thread The thread to remove the request from.
* @param queue_lock_context The queue lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_remove_request_locked(
+static inline void _Thread_Wait_remove_request_locked(
Thread_Control *the_thread,
Thread_queue_Lock_context *queue_lock_context
)
@@ -1875,7 +1907,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_remove_request_locked(
* @param queue The queue that acquires.
* @param queue_lock_context The queue lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_queue_critical(
+static inline void _Thread_Wait_acquire_queue_critical(
Thread_queue_Queue *queue,
Thread_queue_Lock_context *queue_lock_context
)
@@ -1893,7 +1925,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_queue_critical(
* @param queue The queue that releases.
* @param queue_lock_context The queue lock context.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_release_queue_critical(
+static inline void _Thread_Wait_release_queue_critical(
Thread_queue_Queue *queue,
Thread_queue_Lock_context *queue_lock_context
)
@@ -1913,7 +1945,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_release_queue_critical(
* @param[in, out] queue_context The thread queue context for the corresponding
* _Thread_Wait_release_critical().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_critical(
+static inline void _Thread_Wait_acquire_critical(
Thread_Control *the_thread,
Thread_queue_Context *queue_context
)
@@ -1969,7 +2001,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire_critical(
* @param[in, out] queue_context The thread queue context for the corresponding
* _Thread_Wait_release().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire(
+static inline void _Thread_Wait_acquire(
Thread_Control *the_thread,
Thread_queue_Context *queue_context
)
@@ -1988,7 +2020,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_acquire(
* @param[in, out] queue_context The thread queue context used for corresponding
* _Thread_Wait_acquire_critical().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_release_critical(
+static inline void _Thread_Wait_release_critical(
Thread_Control *the_thread,
Thread_queue_Context *queue_context
)
@@ -2030,7 +2062,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_release_critical(
* @param[in, out] queue_context The thread queue context used for corresponding
* _Thread_Wait_acquire().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_release(
+static inline void _Thread_Wait_release(
Thread_Control *the_thread,
Thread_queue_Context *queue_context
)
@@ -2053,7 +2085,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_release(
*
* @see _Thread_Wait_claim_finalize() and _Thread_Wait_restore_default().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_claim(
+static inline void _Thread_Wait_claim(
Thread_Control *the_thread,
Thread_queue_Queue *queue
)
@@ -2082,7 +2114,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_claim(
* @param[in, out] the_thread The thread.
* @param operations The corresponding thread queue operations.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_claim_finalize(
+static inline void _Thread_Wait_claim_finalize(
Thread_Control *the_thread,
const Thread_queue_Operations *operations
)
@@ -2101,7 +2133,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_claim_finalize(
* @param[in, out] queue_lock_context The thread queue lock context used for
* corresponding _Thread_Wait_acquire().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_remove_request(
+static inline void _Thread_Wait_remove_request(
Thread_Control *the_thread,
Thread_queue_Lock_context *queue_lock_context
)
@@ -2130,7 +2162,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_remove_request(
*
* @see _Thread_Wait_claim().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_restore_default(
+static inline void _Thread_Wait_restore_default(
Thread_Control *the_thread
)
{
@@ -2189,7 +2221,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_restore_default(
*
* @param the_thread The thread.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_tranquilize(
+static inline void _Thread_Wait_tranquilize(
Thread_Control *the_thread
)
{
@@ -2207,7 +2239,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_tranquilize(
* @param queue_context The thread queue context used for corresponding
* _Thread_Wait_acquire().
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_cancel(
+static inline void _Thread_Wait_cancel(
Thread_Control *the_thread,
Thread_queue_Context *queue_context
)
@@ -2294,7 +2326,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_cancel(
* @param[in, out] the_thread The thread to set the wait flags of.
* @param flags The flags to set.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Wait_flags_set(
+static inline void _Thread_Wait_flags_set(
Thread_Control *the_thread,
Thread_Wait_flags flags
)
@@ -2313,7 +2345,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Wait_flags_set(
*
* @return The thread's wait flags.
*/
-RTEMS_INLINE_ROUTINE Thread_Wait_flags _Thread_Wait_flags_get(
+static inline Thread_Wait_flags _Thread_Wait_flags_get(
const Thread_Control *the_thread
)
{
@@ -2331,7 +2363,7 @@ RTEMS_INLINE_ROUTINE Thread_Wait_flags _Thread_Wait_flags_get(
*
* @return The thread's wait flags.
*/
-RTEMS_INLINE_ROUTINE Thread_Wait_flags _Thread_Wait_flags_get_acquire(
+static inline Thread_Wait_flags _Thread_Wait_flags_get_acquire(
const Thread_Control *the_thread
)
{
@@ -2358,7 +2390,7 @@ RTEMS_INLINE_ROUTINE Thread_Wait_flags _Thread_Wait_flags_get_acquire(
* @retval true The wait flags were equal to the expected wait flags.
* @retval false The wait flags were not equal to the expected wait flags.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change_release(
+static inline bool _Thread_Wait_flags_try_change_release(
Thread_Control *the_thread,
Thread_Wait_flags expected_flags,
Thread_Wait_flags desired_flags
@@ -2398,7 +2430,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change_release(
* @retval true The wait flags were equal to the expected wait flags.
* @retval false The wait flags were not equal to the expected wait flags.
*/
-RTEMS_INLINE_ROUTINE bool _Thread_Wait_flags_try_change_acquire(
+static inline bool _Thread_Wait_flags_try_change_acquire(
Thread_Control *the_thread,
Thread_Wait_flags expected_flags,
Thread_Wait_flags desired_flags
@@ -2452,7 +2484,7 @@ Objects_Id _Thread_Wait_get_id( const Thread_Control *the_thread );
*
* @param the_thread The thread to get the status of the wait return code of.
*/
-RTEMS_INLINE_ROUTINE Status_Control _Thread_Wait_get_status(
+static inline Status_Control _Thread_Wait_get_status(
const Thread_Control *the_thread
)
{
@@ -2486,7 +2518,7 @@ void _Thread_Timeout( Watchdog_Control *the_watchdog );
* @param [in, out] timer The timer to initialize.
* @param cpu The cpu for the operation.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Timer_initialize(
+static inline void _Thread_Timer_initialize(
Thread_Timer_information *timer,
Per_CPU_Control *cpu
)
@@ -2503,7 +2535,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_initialize(
* @param cpu The cpu for the operation.
* @param ticks The ticks to add to the timeout ticks.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Add_timeout_ticks(
+static inline void _Thread_Add_timeout_ticks(
Thread_Control *the_thread,
Per_CPU_Control *cpu,
Watchdog_Interval ticks
@@ -2529,7 +2561,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Add_timeout_ticks(
* @param routine The watchdog routine for the thread.
* @param expire Expiration for the watchdog.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_realtime(
+static inline void _Thread_Timer_insert_realtime(
Thread_Control *the_thread,
Per_CPU_Control *cpu,
Watchdog_Service_routine_entry routine,
@@ -2554,7 +2586,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_realtime(
*
* @param[in, out] the_thread The thread to remove the watchdog from.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Timer_remove( Thread_Control *the_thread )
+static inline void _Thread_Timer_remove( Thread_Control *the_thread )
{
ISR_lock_Context lock_context;
@@ -2580,7 +2612,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_remove( Thread_Control *the_thread )
* if necessary.
* @param queue The thread queue.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Remove_timer_and_unblock(
+static inline void _Thread_Remove_timer_and_unblock(
Thread_Control *the_thread,
Thread_queue_Queue *queue
)
@@ -2651,7 +2683,7 @@ void _Thread_Do_unpin(
*
* @param executing The currently executing thread.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Pin( Thread_Control *executing )
+static inline void _Thread_Pin( Thread_Control *executing )
{
#if defined(RTEMS_SMP)
_Assert( executing == _Thread_Get_executing() );
@@ -2668,7 +2700,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Pin( Thread_Control *executing )
* @param executing The currently executing thread.
* @param cpu_self The cpu for the operation.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Unpin(
+static inline void _Thread_Unpin(
Thread_Control *executing,
Per_CPU_Control *cpu_self
)
@@ -2720,7 +2752,7 @@ extern "C" {
*
* @param status is the thread wait status.
*/
-RTEMS_INLINE_ROUTINE void _Thread_Timer_remove_and_continue(
+static inline void _Thread_Timer_remove_and_continue(
Thread_Control *the_thread,
Status_Control status
)