|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
Constants and Structures Related with the Thread Control Block. More...
#include <rtems/score/percpu.h>#include <rtems/score/context.h>#include <rtems/score/cpu.h>#include <rtems/score/mppkt.h>#include <rtems/score/object.h>#include <rtems/score/priority.h>#include <rtems/score/scheduler.h>#include <rtems/score/stack.h>#include <rtems/score/states.h>#include <rtems/score/tod.h>#include <rtems/score/tqdata.h>#include <rtems/score/watchdog.h>#include <rtems/score/timestamp.h>#include <rtems/score/threadmp.h>#include <rtems/score/thread.inl>

Go to the source code of this file.
Data Structures | |
| struct | rtems_task_variable_t |
| Internal structure used to manager per task variables. More... | |
| struct | Thread_Start_information |
| The following structure contains the information which defines the starting state of a thread. More... | |
| union | Thread_Wait_information_Object_argument_type |
| Union type to hold a pointer to an immutable or a mutable object. More... | |
| struct | Thread_Wait_information |
| Information required to manage a thread while it is blocked. More... | |
| struct | Thread_Proxy_control |
| The following defines the control block used to manage each thread proxy. More... | |
| struct | Thread_Control_struct |
| This structure defines the Thread Control Block (TCB). More... | |
Defines | |
| #define | RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE |
| #define | RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT |
| #define | RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API |
| #define | __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__ |
| #define | __THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ |
| #define | CPU_USE_DEFERRED_FP_SWITCH FALSE |
| #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_API_FIRST THREAD_API_RTEMS |
| This macro defines the first API which has threads. | |
| #define | THREAD_API_LAST THREAD_API_POSIX |
| This macro defines the last API which has threads. | |
| #define | _Thread_Suspend(_the_thread) _Thread_Set_state( _the_thread, STATES_SUSPENDED ) |
| This routine updates the related suspend fields in the_thread control block to indicate the current nested level. | |
| #define | _Thread_Resume(_the_thread) _Thread_Clear_state( _the_thread, STATES_SUSPENDED ) |
| This routine updates the related suspend fields in the_thread control block to indicate the current nested level. | |
Typedefs | |
| typedef Timestamp_Control | Thread_CPU_usage_t |
| typedef void * | Thread |
| The following defines the "return type" of a thread. | |
| typedef uintptr_t | Thread_Entry_numeric_type |
| Type of the numeric argument of a thread entry function with at least one numeric argument. | |
| typedef Thread(* | Thread_Entry )(void) |
| This type corresponds to a very simple style thread entry point. | |
| typedef Thread(* | Thread_Entry_numeric )(Thread_Entry_numeric_type) |
| This type corresponds to a thread entry point which takes a single unsigned thirty-two bit integer as an argument. | |
| typedef Thread(* | Thread_Entry_pointer )(void *) |
| This type corresponds to a thread entry point which takes a single untyped pointer as an argument. | |
| typedef Thread(* | Thread_Entry_both_pointer_first )(void *, Thread_Entry_numeric_type) |
| This type corresponds to a thread entry point which takes a single untyped pointer and an unsigned thirty-two bit integer as arguments. | |
| typedef Thread(* | Thread_Entry_both_numeric_first )(Thread_Entry_numeric_type, void *) |
| This type corresponds to a thread entry point which takes a single unsigned thirty-two bit integer and an untyped pointer and an as arguments. | |
| typedef void(* | Thread_CPU_budget_algorithm_callout )(Thread_Control *) |
| This defines thes the entry point for the thread specific timeslice budget management algorithm. | |
| typedef void(* | rtems_per_thread_routine )(Thread_Control *) |
| This defines the type for a method which operates on a single thread. | |
Enumerations | |
| enum | Thread_Start_types { THREAD_START_NUMERIC, THREAD_START_POINTER } |
| The following defines the ways in which the entry point for a thread can be invoked. More... | |
| enum | Thread_CPU_budget_algorithms { THREAD_CPU_BUDGET_ALGORITHM_NONE, THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE, THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE, THREAD_CPU_BUDGET_ALGORITHM_CALLOUT } |
| The following lists the algorithms used to manage the thread cpu budget. More... | |
| enum | Thread_APIs { THREAD_API_RTEMS, THREAD_API_POSIX } |
| The following record defines the control block used to manage each thread. More... | |
Functions | |
| void | _Thread_Handler_initialization (void) |
| Initialize thread handler. | |
| void | _Thread_Create_idle (void) |
| Create idle thread. | |
| void | _Thread_Start_multitasking (void) |
| Start thread multitasking. | |
| void | _Thread_Dispatch (void) |
| Dispatch thread. | |
| size_t | _Thread_Stack_Allocate (Thread_Control *the_thread, size_t stack_size) |
| Allocate the requested stack space for the thread. | |
| void | _Thread_Stack_Free (Thread_Control *the_thread) |
| Deallocate thread stack. | |
| bool | _Thread_Initialize (Objects_Information *information, Thread_Control *the_thread, 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. | |
| bool | _Thread_Start (Thread_Control *the_thread, Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument) |
| Initializes thread and executes it. | |
| bool | _Thread_Restart (Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument) |
| Restarts the specified thread. | |
| void | _Thread_Reset (Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument) |
| Resets a thread to its initial state. | |
| void | _Thread_Close (Objects_Information *information, Thread_Control *the_thread) |
| Frees all memory associated with the specified thread. | |
| void | _Thread_Ready (Thread_Control *the_thread) |
| Removes any set states for the_thread. | |
| void | _Thread_Clear_state (Thread_Control *the_thread, States_Control state) |
| Clears the indicated STATES for the_thread. | |
| void | _Thread_Set_state (Thread_Control *the_thread, States_Control state) |
| Sets the indicated state for the_thread. | |
| void | _Thread_Set_transient (Thread_Control *the_thread) |
| Sets the transient state for a thread. | |
| void | _Thread_Load_environment (Thread_Control *the_thread) |
| Initializes enviroment for a thread. | |
| void | _Thread_Handler (void) |
| Wrapper function for all threads. | |
| void | _Thread_Delay_ended (Objects_Id id, void *ignored) |
| Ended the delay of a thread. | |
| void | _Thread_Change_priority (Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it) |
| Change the priority of a thread. | |
| void | _Thread_Set_priority (Thread_Control *the_thread, Priority_Control new_priority) |
| Set thread priority. | |
| void * | _Thread_Idle_body (uintptr_t ignored) |
| This routine is the body of the system idle thread. | |
| void | rtems_iterate_over_all_threads (rtems_per_thread_routine routine) |
| Iterates over all threads. | |
| Thread_Control * | _Thread_Get (Objects_Id id, Objects_Locations *location) |
| Maps thread Id to a TCB pointer. | |
| void | _Thread_blocking_operation_Cancel (Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level) |
| Cancel a blocking operation due to ISR. | |
| void | _Thread_Dispatch_initialization (void) |
| Initializes the thread dispatching subsystem. | |
| bool | _Thread_Dispatch_in_critical_section (void) |
| Checks if thread dispatch says that we are in a critical section. | |
| uint32_t | _Thread_Dispatch_get_disable_level (void) |
| Returns value of the the thread dispatch level. | |
| uint32_t | _Thread_Dispatch_set_disable_level (uint32_t value) |
| Sets thread dispatch level to the value passed in. | |
| uint32_t | _Thread_Dispatch_increment_disable_level (void) |
| Increments the thread dispatch level. | |
| uint32_t | _Thread_Dispatch_decrement_disable_level (void) |
| Decrements the thread dispatch level. | |
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 Context_Control | _Thread_BSP_context |
| The following context area contains the context of the "thread" which invoked the start multitasking routine. | |
| SCORE_EXTERN volatile uint32_t | _Thread_Dispatch_disable_level |
| The following declares the dispatch critical section nesting counter which is used to prevent context switches at inopportune moments. | |
|
SCORE_EXTERN SMP_lock_spinlock_nested_Control | _Thread_Dispatch_disable_level_lock |
| The following declares the smp spinlock to be used to control the dispatch critical section accesses across cpus. | |
| SCORE_EXTERN uint32_t | _Thread_Maximum_extensions |
| The following holds how many user extensions are in the system. | |
| SCORE_EXTERN uint32_t | _Thread_Ticks_per_timeslice |
| The following is used to manage the length of a timeslice quantum. | |
| 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. | |
Constants and Structures Related with the Thread Control Block.
This include file contains all constants and structures associated with the thread control block.
1.7.5