|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
This handler encapsulates functionality related to the management of threads. More...
|
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. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Stop_multitasking (void) |
| This routine halts multitasking and returns control to the "thread" (i.e. | |
| 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_Is_heir (const Thread_Control *the_thread) |
| This function returns true if the_thread is the heir thread, and false otherwise. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_executing_also_the_heir (void) |
| This function returns true if the currently executing thread is also 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. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Restart_self (void) |
| 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_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 void | _Thread_Disable_dispatch (void) |
| This routine prevents dispatching. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Enable_dispatch (void) |
| This routine allows dispatching to occur again. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Unnest_dispatch (void) |
| This routine allows dispatching to occur again. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Is_dispatching_enabled (void) |
| This function returns true if dispatching is disabled, and false otherwise. | |
| 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. | |
|
RTEMS_INLINE_ROUTINE Thread_Control * | _Thread_Internal_allocate (void) |
| This routine allocates an internal thread. | |
| RTEMS_INLINE_ROUTINE void | _Thread_Internal_free (Thread_Control *the_task) |
| This routine frees an internal thread. | |
|
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. | |
| RTEMS_INLINE_ROUTINE bool | _Thread_Evaluate_is_dispatch_needed (bool are_signals_pending) |
| This routine evaluates the current scheduling information for the system and determines if a context switch is required. | |
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. | |
This handler encapsulates functionality related to the management of threads.
This includes the creation, deletion, and scheduling of threads.
The following variables are maintained as part of the per cpu data structure.
+ Idle thread pointer + Executing thread pointer + Heir thread pointer
| #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.
A force parameter of true will force a resume and clear the suspend count.
| #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.
| typedef void* Thread |
The following defines the "return type" of a thread.
| typedef Thread( * Thread_Entry)(void) |
This type corresponds to a very simple style thread entry point.
| typedef uintptr_t Thread_Entry_numeric_type |
Type of the numeric argument of a thread entry function with at least one numeric argument.
This numeric argument type designates an unsigned integer type with the property that any valid pointer to void can be converted to this type and then converted back to a pointer to void. The result will compare equal to the original pointer.
| enum Thread_APIs |
The following lists the algorithms used to manage the thread cpu budget.
Reset Timeslice: At each context switch, reset the time quantum. Exhaust Timeslice: Only reset the quantum once it is consumed. Callout: Execute routine when budget is consumed.
| enum Thread_Start_types |
The following defines the ways in which the entry point for a thread can be invoked.
Basically, it can be passed any combination/permutation of a pointer and an uint32_t value.
| 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.
This method is used to cancel a blocking operation that was satisfied from an ISR while the thread executing was in the process of blocking.
This method will restore the previous ISR disable level during the cancel operation. Thus it is an implicit _ISR_Enable().
| [in] | sync_state | is the synchronization state |
| [in] | the_thread | is the thread whose blocking is canceled |
| [in] | level | is the previous ISR disable level |
| void _Thread_Change_priority | ( | Thread_Control * | the_thread, |
| Priority_Control | new_priority, | ||
| bool | prepend_it | ||
| ) |
Change the priority of a thread.
This routine changes the current priority of the_thread to new_priority. It performs any necessary scheduling operations including the selection of a new heir thread.
| [in] | the_thread | is the thread to change |
| [in] | new_priority | is the priority to set the_thread to |
| [in] | prepend_it | is a switch to prepend the thread |
Referenced by _CORE_mutex_Seize_interrupt_trylock_body().
| void _Thread_Clear_state | ( | Thread_Control * | the_thread, |
| States_Control | state | ||
| ) |
Clears the indicated STATES for the_thread.
This routine clears the indicated STATES for the_thread. It performs any necessary scheduling operations including the selection of a new heir thread.
Referenced by _Thread_Unblock().
| void _Thread_Close | ( | Objects_Information * | information, |
| Thread_Control * | the_thread | ||
| ) |
Frees all memory associated with the specified thread.
This routine frees all memory associated with the specified thread and removes it from the local object table so no further operations on this thread are allowed.
| void _Thread_Create_idle | ( | void | ) |
Create idle thread.
This routine creates the idle thread.
| void _Thread_Delay_ended | ( | Objects_Id | id, |
| void * | ignored | ||
| ) |
Ended the delay of a thread.
This routine is invoked when a thread must be unblocked at the end of a time based delay (i.e. wake after or wake when). It is called by the watchdog handler.
| [in] | id | is the thread id |
| void _Thread_Dispatch | ( | void | ) |
Dispatch thread.
This routine is responsible for transferring control of the processor from the executing thread to the heir thread. Once the heir is running an attempt is made to dispatch any ASRs. As part of this process, it is responsible for the following actions: + saving the context of the executing thread + restoring the context of the heir thread + dispatching any signals for the resulting executing thread
ALTERNATE ENTRY POINTS: void _Thread_Enable_dispatch();
Referenced by _Thread_Enable_dispatch().
| uint32_t _Thread_Dispatch_decrement_disable_level | ( | void | ) |
Decrements the thread dispatch level.
This routine decrements the thread dispatch level.
Referenced by _Thread_Enable_dispatch(), and _Thread_Unnest_dispatch().
| uint32_t _Thread_Dispatch_get_disable_level | ( | void | ) |
Returns value of the the thread dispatch level.
This routine returns value of the the thread dispatch level.
| bool _Thread_Dispatch_in_critical_section | ( | void | ) |
Checks if thread dispatch says that we are in a critical section.
This routine returns true if thread dispatch indicates that we are in a critical section.
Referenced by _Thread_Is_dispatching_enabled().
| uint32_t _Thread_Dispatch_increment_disable_level | ( | void | ) |
Increments the thread dispatch level.
This rountine increments the thread dispatch level
Referenced by _Thread_Disable_dispatch().
| void _Thread_Dispatch_initialization | ( | void | ) |
Initializes the thread dispatching subsystem.
This routine initializes the thread dispatching subsystem.
| uint32_t _Thread_Dispatch_set_disable_level | ( | uint32_t | value | ) |
Sets thread dispatch level to the value passed in.
This routine sets thread dispatch level to the value passed in.
| RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch | ( | void | ) |
This routine allows dispatching to occur again.
If this is the outer most dispatching critical section, then a dispatching operation will be performed and, if necessary, control of the processor will be transferred to the heir thread.
References RTEMS_COMPILER_MEMORY_BARRIER, _Thread_Dispatch_decrement_disable_level(), and _Thread_Dispatch().
Referenced by _CORE_mutex_Seize_interrupt_trylock_body(), and _CORE_semaphore_Seize_isr_disable().
| RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_is_dispatch_needed | ( | bool | are_signals_pending | ) |
This routine evaluates the current scheduling information for the system and determines if a context switch is required.
This is usually called after changing an execution mode such as preemptability for a thread.
| [in] | are_signals_pending | specifies whether or not the API level signals are pending and a dispatch is needed. |
References _Thread_Is_heir(), and Thread_Control_struct::is_preemptible.
| Thread_Control* _Thread_Get | ( | Objects_Id | id, |
| Objects_Locations * | location | ||
| ) |
Maps thread Id to a TCB pointer.
This function maps thread IDs to thread control blocks. If ID corresponds to a local thread, then it returns the_thread control pointer which maps to ID and location is set to OBJECTS_LOCAL. If the thread ID is global and resides on a remote node, then location is set to OBJECTS_REMOTE, and the_thread is undefined. Otherwise, location is set to OBJECTS_ERROR and the_thread is undefined.
| [in] | id | is the id of the thread. |
| [in] | location | is the location of the block. |
| void _Thread_Handler | ( | void | ) |
Wrapper function for all threads.
This routine is the wrapper function for all threads. It is the starting point for all threads. The user provided thread entry point is invoked by this routine. Operations which must be performed immediately before and after the user's thread executes are found here.
| void _Thread_Handler_initialization | ( | void | ) |
Initialize thread handler.
This routine performs the initialization necessary for this handler.
| void* _Thread_Idle_body | ( | uintptr_t | ignored | ) |
This routine is the body of the system idle thread.
NOTE: This routine is actually instantiated by confdefs.h when needed.
| 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.
This routine initializes the specified the thread. It allocates all memory associated with this thread. It completes by adding the thread to the local object table so operations on this thread id are allowed.
| RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking | ( | uint32_t | code | ) |
Is proxy blocking.
status which indicates that a proxy is blocking, and false otherwise.
References THREAD_STATUS_PROXY_BLOCKING.
| void _Thread_Load_environment | ( | Thread_Control * | the_thread | ) |
Initializes enviroment for a thread.
This routine initializes the context of the_thread to its appropriate starting state.
| [in] | the_thread | is the pointer to the thread control block. |
| void _Thread_Ready | ( | Thread_Control * | the_thread | ) |
Removes any set states for the_thread.
This routine removes any set states for the_thread. It performs any necessary scheduling operations including the selection of a new heir thread.
| void _Thread_Reset | ( | Thread_Control * | the_thread, |
| void * | pointer_argument, | ||
| Thread_Entry_numeric_type | numeric_argument | ||
| ) |
Resets a thread to its initial state.
This routine resets a thread to its initial state but does not restart it. Some APIs do this in separate operations and this division helps support this.
| [in] | the_thread | is the thread to resets |
| [in] | pointer_argument | |
| [in] | numeric_argument |
| bool _Thread_Restart | ( | Thread_Control * | the_thread, |
| void * | pointer_argument, | ||
| Thread_Entry_numeric_type | numeric_argument | ||
| ) |
Restarts the specified thread.
This support routine restarts the specified task in a way that the next time this thread executes, it will begin execution at its original starting point.
TODO: multiple task arg profiles
| void _Thread_Set_priority | ( | Thread_Control * | the_thread, |
| Priority_Control | new_priority | ||
| ) |
Set thread priority.
This routine updates the priority related fields in the_thread control block to indicate the current priority is now new_priority.
| void _Thread_Set_state | ( | Thread_Control * | the_thread, |
| States_Control | state | ||
| ) |
Sets the indicated state for the_thread.
This routine sets the indicated state for the_thread. It performs any necessary scheduling operations including the selection of a new heir thread.
| [in] | the_thread | is the thread to set the state for. |
| [in] | state | is the state to set the_thread to. |
| void _Thread_Set_transient | ( | Thread_Control * | the_thread | ) |
Sets the transient state for a thread.
This routine sets the Transient state for the_thread. It performs any necessary scheduling operations including the selection of a new heir thread.
| [in] | the_thread | is the thread to preform the action upon. |
| size_t _Thread_Stack_Allocate | ( | Thread_Control * | the_thread, |
| size_t | stack_size | ||
| ) |
Allocate the requested stack space for the thread.
Allocate the requested stack space for the thread. Set the Start.stack field to the address of the stack.
| [in] | the_thread | is the thread where the stack space is requested |
| actual | size allocated after any adjustment |
| zero | if the allocation failed |
| void _Thread_Stack_Free | ( | Thread_Control * | the_thread | ) |
Deallocate thread stack.
Deallocate the Thread's stack.
| 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.
This routine initializes the executable information for a thread and makes it ready to execute. After this routine executes, the thread competes with all other threads for CPU time.
| the_thread | is the thread to be initialized |
| the_prototype | |
| entry_point | |
| pointer_argument | |
| numeric_argument |
| void _Thread_Start_multitasking | ( | void | ) |
Start thread multitasking.
This routine initiates multitasking. It is invoked only as part of initialization and its invocation is the last act of the non-multitasking part of the system initialization.
| RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking | ( | void | ) |
This routine halts multitasking and returns control to the "thread" (i.e.
the BSP) which initially invoked the routine which initialized the system.
References _Thread_BSP_context, and _Context_Restart_self.
| RTEMS_INLINE_ROUTINE void _Thread_Unblock | ( | Thread_Control * | the_thread | ) |
This routine clears any blocking state for the_thread.
It performs any necessary scheduling operations including the selection of a new heir thread.
References _Thread_Clear_state(), and STATES_BLOCKED.
| RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch | ( | void | ) |
This routine allows dispatching to occur again.
However, no dispatching operation is performed even if this is the outer most dispatching critical section.
References RTEMS_COMPILER_MEMORY_BARRIER, and _Thread_Dispatch_decrement_disable_level().
| void rtems_iterate_over_all_threads | ( | rtems_per_thread_routine | routine | ) |
Iterates over all threads.
This routine iterates over all threads regardless of API and invokes the specified routine.
| SCORE_EXTERN Context_Control _Thread_BSP_context |
The following context area contains the context of the "thread" which invoked the start multitasking routine.
This context is restored as the last action of the stop multitasking routine. Thus control of the processor can be returned to the environment which initiated the system.
Referenced by _Thread_Stop_multitasking().
| SCORE_EXTERN struct _reent** _Thread_libc_reent |
The C library re-enter-rant global pointer.
Some C library implementations such as newlib have a single global pointer that changed during a context switch. The pointer points to that global pointer. The Thread control block holds a pointer to the task specific data.
Referenced by _Thread_Get_libc_reent(), and _Thread_Set_libc_reent().
| SCORE_EXTERN uint32_t _Thread_Maximum_extensions |
The following holds how many user extensions are in the system.
This is used to determine how many user extension data areas to allocate per thread.
1.7.5