|
RTEMS CPU Kit with SuperCore
|
Inlined Routines from the Thread Handler. More...
#include <rtems/score/thread.h>#include <rtems/score/assert.h>#include <rtems/score/chainimpl.h>#include <rtems/score/interr.h>#include <rtems/score/isr.h>#include <rtems/score/objectimpl.h>#include <rtems/score/resourceimpl.h>#include <rtems/score/statesimpl.h>#include <rtems/score/sysstate.h>#include <rtems/score/threadqimpl.h>#include <rtems/score/todimpl.h>#include <rtems/config.h>
Go to the source code of this file.
Macros | |
| #define | THREAD_STATUS_PROXY_BLOCKING 0x1111111 |
| The following structure contains the information necessary to manage a thread which it is waiting for a resource. | |
| #define | THREAD_CHAIN_NODE_TO_THREAD(node) RTEMS_CONTAINER_OF( node, Thread_Control, Wait.Node.Chain ) |
| #define | THREAD_RBTREE_NODE_TO_THREAD(node) RTEMS_CONTAINER_OF( node, Thread_Control, Wait.Node.RBTree ) |
| #define | _Thread_Lock_set(the_thread, new_lock) do { } while ( 0 ) |
| Sets a new thread lock. More... | |
| #define | _Thread_Lock_restore_default(the_thread) do { } while ( 0 ) |
| Restores the default thread lock. More... | |
| #define | THREAD_WAIT_FLAGS_INITIAL 0x0U |
| The initial thread wait flags value set by _Thread_Initialize(). | |
| #define | THREAD_WAIT_STATE_MASK 0xffU |
| Mask to get the thread wait state flags. | |
| #define | THREAD_WAIT_STATE_INTEND_TO_BLOCK 0x1U |
| Indicates that the thread begins with the blocking operation. More... | |
| #define | THREAD_WAIT_STATE_BLOCKED 0x2U |
| Indicates that the thread completed the blocking operation. | |
| #define | THREAD_WAIT_STATE_READY_AGAIN 0x4U |
| Indicates that a condition to end the thread wait occurred. More... | |
| #define | THREAD_WAIT_CLASS_MASK 0xff00U |
| Mask to get the thread wait class flags. | |
| #define | THREAD_WAIT_CLASS_EVENT 0x100U |
| Indicates that the thread waits for an event. | |
| #define | THREAD_WAIT_CLASS_SYSTEM_EVENT 0x200U |
| Indicates that the thread waits for a system event. | |
| #define | THREAD_WAIT_CLASS_OBJECT 0x400U |
| Indicates that the thread waits for a object. | |
Typedefs | |
| typedef bool(* | Thread_Change_priority_filter) (Thread_Control *the_thread, Priority_Control *new_priority, void *arg) |
| Filters a thread priority change. More... | |
Functions | |
| void | _Thread_Handler_initialization (void) |
| Initialize thread handler. More... | |
| void | _Thread_Create_idle (void) |
| Create idle thread. More... | |
| void | _Thread_Start_multitasking (void) |
| Start thread multitasking. More... | |
| size_t | _Thread_Stack_Allocate (Thread_Control *the_thread, size_t stack_size) |
| Allocate the requested stack space for the thread. More... | |
| void | _Thread_Stack_Free (Thread_Control *the_thread) |
| Deallocate thread stack. More... | |
| bool | _Thread_Initialize (Objects_Information *information, Thread_Control *the_thread, const struct Scheduler_Control *scheduler, void *stack_area, size_t stack_size, bool is_fp, Priority_Control priority, bool is_preemptible, Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name) |
| Initialize thread. More... | |
| bool | _Thread_Start (Thread_Control *the_thread, Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument, Per_CPU_Control *cpu) |
| Initializes thread and executes it. More... | |
| bool | _Thread_Restart (Thread_Control *the_thread, Thread_Control *executing, void *pointer_argument, Thread_Entry_numeric_type numeric_argument) |
| void | _Thread_Yield (Thread_Control *executing) |
| bool | _Thread_Set_life_protection (bool protect) |
| void | _Thread_Life_action_handler (Thread_Control *executing, Thread_Action *action, Per_CPU_Control *cpu, ISR_Level level) |
| void | _Thread_Kill_zombies (void) |
| Kills all zombie threads in the system. More... | |
| void | _Thread_Close (Thread_Control *the_thread, Thread_Control *executing) |
| Closes the thread. More... | |
| States_Control | _Thread_Clear_state (Thread_Control *the_thread, States_Control state) |
| Clears the specified thread state. More... | |
| States_Control | _Thread_Set_state (Thread_Control *the_thread, States_Control state) |
| Sets the specified thread state. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Ready (Thread_Control *the_thread) |
| Clears all thread states. More... | |
| void | _Thread_Load_environment (Thread_Control *the_thread) |
| Initializes enviroment for a thread. More... | |
| void | _Thread_Handler (void) |
| Wrapper function for all threads. More... | |
| void * | _Thread_Global_construction (void) |
| Executes the global constructors and then restarts itself as the first initialization thread. More... | |
| void | _Thread_Delay_ended (Objects_Id id, void *ignored) |
| Ended the delay of a thread. More... | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Priority_less_than (Priority_Control left, Priority_Control right) |
| Returns true if the left thread priority is less than the right thread priority in the intuitive sense of priority and false otherwise. | |
| RTEMS_INLINE_ROUTINE Priority_Control | _Thread_Priority_highest (Priority_Control left, Priority_Control right) |
| Returns the highest priority of the left and right thread priorities in the intuitive sense of priority. | |
| void | _Thread_Change_priority (Thread_Control *the_thread, Priority_Control new_priority, void *arg, Thread_Change_priority_filter filter, bool prepend_it) |
| Changes the priority of a thread if allowed by the filter function. More... | |
| void | _Thread_Raise_priority (Thread_Control *the_thread, Priority_Control new_priority) |
| Raises the priority of a thread. More... | |
| void | _Thread_Restore_priority (Thread_Control *the_thread) |
| Sets the current to the real priority of a thread. More... | |
| void | _Thread_Set_priority (Thread_Control *the_thread, Priority_Control new_priority, Priority_Control *old_priority, bool prepend_it) |
| Sets the priority of a thread. More... | |
| Thread_Control * | _Thread_Get (Objects_Id id, Objects_Locations *location) |
| Maps thread Id to a TCB pointer. More... | |
| Thread_Control * | _Thread_Get_interrupt_disable (Objects_Id id, Objects_Locations *location, ISR_lock_Context *lock_context) |
| Gets a thread by its identifier. More... | |
| RTEMS_INLINE_ROUTINE Per_CPU_Control * | _Thread_Get_CPU (const Thread_Control *thread) |
| RTEMS_INLINE_ROUTINE void | _Thread_Set_CPU (Thread_Control *thread, Per_CPU_Control *cpu) |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_executing (const Thread_Control *the_thread) |
| This function returns true if the_thread is the currently executing thread, and false otherwise. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Get_time_of_last_context_switch (Thread_Control *the_thread, Timestamp_Control *time_of_context_switch) |
| Returns true and sets time_of_context_switch to the time of the last context switch when the thread is currently executing in the system, otherwise false. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_heir (const Thread_Control *the_thread) |
| This function returns true if the_thread is the heir thread, and false otherwise. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Unblock (Thread_Control *the_thread) |
| This routine clears any blocking state for the_thread. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Restart_self (Thread_Control *executing) |
| This routine resets the current context of the calling thread to that of its initial state. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_allocated_fp (const Thread_Control *the_thread) |
| This function returns true if the floating point context of the_thread is currently loaded in the floating point unit, and false otherwise. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Save_fp (Thread_Control *executing) |
| RTEMS_INLINE_ROUTINE void | _Thread_Restore_fp (Thread_Control *executing) |
| RTEMS_INLINE_ROUTINE void | _Thread_Deallocate_fp (void) |
| This routine is invoked when the currently loaded floating point context is now longer associated with an active thread. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_context_switch_necessary (void) |
| This function returns true if dispatching is disabled, and false otherwise. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_null (const Thread_Control *the_thread) |
| This function returns true if the_thread is NULL and false otherwise. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_proxy_blocking (uint32_t code) |
| Is proxy blocking. More... | |
| RTEMS_INLINE_ROUTINE uint32_t | _Thread_Get_maximum_internal_threads (void) |
| RTEMS_INLINE_ROUTINE Thread_Control * | _Thread_Internal_allocate (void) |
| RTEMS_INLINE_ROUTINE Thread_Control * | _Thread_Get_heir_and_make_it_executing (Per_CPU_Control *cpu_self) |
| Gets the heir of the processor and makes it executing. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Update_cpu_time_used (Thread_Control *executing, Timestamp_Control *time_of_last_context_switch) |
| RTEMS_INLINE_ROUTINE void | _Thread_Action_control_initialize (Thread_Action_control *action_control) |
| RTEMS_INLINE_ROUTINE void | _Thread_Action_initialize (Thread_Action *action, Thread_Action_handler handler) |
| RTEMS_INLINE_ROUTINE Per_CPU_Control * | _Thread_Action_ISR_disable_and_acquire_for_executing (ISR_Level *level) |
| RTEMS_INLINE_ROUTINE Per_CPU_Control * | _Thread_Action_ISR_disable_and_acquire (Thread_Control *thread, ISR_Level *level) |
| RTEMS_INLINE_ROUTINE void | _Thread_Action_release_and_ISR_enable (Per_CPU_Control *cpu, ISR_Level level) |
| RTEMS_INLINE_ROUTINE void | _Thread_Add_post_switch_action (Thread_Control *thread, Thread_Action *action) |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_life_restarting (Thread_Life_state life_state) |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_life_terminating (Thread_Life_state life_state) |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_life_protected (Thread_Life_state life_state) |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_life_changing (Thread_Life_state life_state) |
| RTEMS_INLINE_ROUTINE bool | _Thread_Owns_resources (const Thread_Control *the_thread) |
| Returns true if the thread owns resources, and false otherwise. More... | |
| RTEMS_INLINE_ROUTINE Thread_Control * | _Thread_Lock_acquire_default_for_executing (ISR_lock_Context *lock_context) |
| Acquires the default thread lock and returns the executing thread. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Lock_acquire_default_critical (Thread_Control *the_thread, ISR_lock_Context *lock_context) |
| Acquires the default thread lock inside a critical section (interrupts disabled). More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Lock_acquire_default (Thread_Control *the_thread, ISR_lock_Context *lock_context) |
| Acquires the default thread lock. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Lock_release_critical (ISR_lock_Control *lock, ISR_lock_Context *lock_context) |
| Releases the thread lock inside a critical section (interrupts disabled). More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Lock_release (ISR_lock_Control *lock, ISR_lock_Context *lock_context) |
| Releases the thread lock. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Lock_release_default_critical (Thread_Control *the_thread, ISR_lock_Context *lock_context) |
| Releases the default thread lock inside a critical section (interrupts disabled). More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Lock_release_default (Thread_Control *the_thread, ISR_lock_Context *lock_context) |
| Releases the default thread lock. More... | |
| RTEMS_INLINE_ROUTINE ISR_lock_Control * | _Thread_Lock_acquire (Thread_Control *the_thread, ISR_lock_Context *lock_context) |
| Acquires the thread lock. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Wait_flags_set (Thread_Control *the_thread, Thread_Wait_flags flags) |
| RTEMS_INLINE_ROUTINE Thread_Wait_flags | _Thread_Wait_flags_get (const Thread_Control *the_thread) |
| RTEMS_INLINE_ROUTINE bool | _Thread_Wait_flags_try_change_critical (Thread_Control *the_thread, Thread_Wait_flags expected_flags, Thread_Wait_flags desired_flags) |
| Tries to change the thread wait flags inside a critical section (interrupts disabled). More... | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Wait_flags_try_change (Thread_Control *the_thread, Thread_Wait_flags expected_flags, Thread_Wait_flags desired_flags) |
| Tries to change the thread wait flags. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Wait_set_queue (Thread_Control *the_thread, Thread_queue_Control *new_queue) |
| Sets the thread queue. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Wait_set_operations (Thread_Control *the_thread, const Thread_queue_Operations *new_operations) |
| Sets the thread queue operations. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Wait_restore_default_operations (Thread_Control *the_thread) |
| Restores the default thread queue operations. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Wait_set_timeout_code (Thread_Control *the_thread, uint32_t timeout_code) |
| Sets the thread wait timeout code. More... | |
| void | _Thread_Timeout (Objects_Id id, void *arg) |
| General purpose thread wait timeout. More... | |
| RTEMS_INLINE_ROUTINE void | _Thread_Debug_set_real_processor (Thread_Control *the_thread, Per_CPU_Control *cpu) |
| RTEMS_INLINE_ROUTINE struct _reent ** | _Thread_Get_libc_reent (void) |
| This routine returns the C library re-enterant pointer. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Set_libc_reent (struct _reent **libc_reent) |
| This routine set the C library re-enterant pointer. | |
Variables | |
| SCORE_EXTERN void * | rtems_ada_self |
| Self for the GNU Ada Run-Time. | |
| SCORE_EXTERN Objects_Information | _Thread_Internal_information |
| The following defines the information control block used to manage this class of objects. | |
| SCORE_EXTERN Thread_Control * | _Thread_Allocated_fp |
| The following points to the thread whose floating point context is currently loaded. | |
| SCORE_EXTERN struct _reent ** | _Thread_libc_reent |
| The C library re-enter-rant global pointer. More... | |
Inlined Routines from the Thread Handler.
This file contains the macro implementation of the inlined routines from the Thread handler.
1.8.13