21 #ifndef _RTEMS_SCORE_THREADIMPL_H 22 #define _RTEMS_SCORE_THREADIMPL_H 35 #include <rtems/config.h> 50 #define THREAD_STATUS_PROXY_BLOCKING 0x1111111 67 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 71 #if !defined(__DYNAMIC_REENT__) 81 #define THREAD_CHAIN_NODE_TO_THREAD( node ) \ 82 RTEMS_CONTAINER_OF( node, Thread_Control, Wait.Node.Chain ) 84 #define THREAD_RBTREE_NODE_TO_THREAD( node ) \ 85 RTEMS_CONTAINER_OF( node, Thread_Control, Wait.Node.RBTree ) 87 #if defined(RTEMS_SMP) 88 #define THREAD_RESOURCE_NODE_TO_THREAD( node ) \ 89 RTEMS_CONTAINER_OF( node, Thread_Control, Resource_node ) 191 void *pointer_argument,
196 bool _Thread_Restart(
199 void *pointer_argument,
205 bool _Thread_Set_life_protection(
bool protect );
207 void _Thread_Life_action_handler(
490 #if defined(RTEMS_SMP) 495 return _Per_CPU_Get();
504 #if defined(RTEMS_SMP) 521 return ( the_thread == _Thread_Executing );
524 #if defined(RTEMS_SMP) 536 return _CPU_Context_Get_is_executing( &the_thread->
Registers );
554 if ( _Thread_Executing->Object.id == the_thread->
Object.
id ) {
555 *time_of_context_switch = _Thread_Time_of_last_context_switch;
559 if ( _Thread_Is_executing_on_a_processor( the_thread ) ) {
560 *time_of_context_switch =
579 return ( the_thread == _Thread_Heir );
602 #if defined(RTEMS_SMP) 605 _Giant_Release( _Per_CPU_Get() );
607 _ISR_Disable_without_giant( level );
611 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 616 _CPU_Context_Restart_self( &executing->
Registers );
625 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 630 return ( the_thread == _Thread_Allocated_fp );
649 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 650 #if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE ) 659 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 660 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) 663 if ( _Thread_Allocated_fp != NULL )
666 _Thread_Allocated_fp = executing;
680 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 683 _Thread_Allocated_fp = NULL;
694 return ( _Thread_Dispatch_necessary );
705 return ( the_thread == NULL );
723 uint32_t maximum_internal_threads =
727 #if defined(RTEMS_MULTIPROCESSING) 728 if ( _System_state_Is_multiprocessing ) {
729 ++maximum_internal_threads;
733 return maximum_internal_threads;
760 #if defined( RTEMS_SMP ) 766 _Atomic_Fence( ATOMIC_ORDER_SEQ_CST );
769 heir = cpu_self->
heir;
775 #if defined( RTEMS_SMP ) 782 cpu_for_heir->
heir = heir;
789 _Atomic_Fence( ATOMIC_ORDER_SEQ_CST );
798 if ( cpu_for_heir != cpu_self ) {
799 _Per_CPU_Send_interrupt( cpu_for_heir );
813 _TOD_Get_uptime( &uptime );
815 time_of_last_context_switch,
819 *time_of_last_context_switch = uptime;
835 action->handler = handler;
840 _Thread_Action_ISR_disable_and_acquire_for_executing(
ISR_Level *level )
844 _ISR_Disable_without_giant( *level );
845 cpu = _Per_CPU_Get();
846 _Per_CPU_Acquire( cpu );
858 _ISR_Disable_without_giant( *level );
859 cpu = _Thread_Get_CPU( thread );
860 _Per_CPU_Acquire( cpu );
870 _Per_CPU_Release_and_ISR_enable( cpu, level );
881 cpu_of_thread = _Thread_Action_ISR_disable_and_acquire( thread, &level );
884 #if defined(RTEMS_SMP) 885 if ( _Per_CPU_Get() != cpu_of_thread ) {
886 _Per_CPU_Send_interrupt( cpu_of_thread );
891 &thread->Post_switch_actions.Chain,
895 _Thread_Action_release_and_ISR_enable( cpu_of_thread, level );
902 return ( life_state & THREAD_LIFE_RESTARTING ) != 0;
909 return ( life_state & THREAD_LIFE_TERMINATING ) != 0;
916 return ( life_state & THREAD_LIFE_PROTECTED ) != 0;
923 return ( life_state & THREAD_LIFE_RESTARTING_TERMINATING ) != 0;
944 #if defined(RTEMS_SMP) 945 owns_resources = owns_resources
946 || _Resource_Node_owns_resources( &the_thread->Resource_node );
949 return owns_resources;
969 executing = _Thread_Executing;
1060 #
if defined(RTEMS_SMP)
1061 &the_thread->Lock.Default,
1098 #if defined(RTEMS_SMP) 1102 uint32_t my_generation;
1105 my_generation = the_thread->Lock.generation;
1111 _Atomic_Fence( ATOMIC_ORDER_ACQUIRE );
1113 lock = the_thread->Lock.current;
1120 _Atomic_Fence( ATOMIC_ORDER_ACQUIRE );
1122 if ( the_thread->Lock.generation == my_generation ) {
1137 #if defined(RTEMS_SMP) 1147 the_thread->Lock.current = new_lock;
1154 _Atomic_Fence( ATOMIC_ORDER_RELEASE );
1160 _Atomic_Fetch_add_uint(
1161 &the_thread->Lock.generation,
1163 ATOMIC_ORDER_RELAXED
1177 #if defined(RTEMS_SMP) 1186 _Assert( the_thread->Lock.current == &the_thread->Lock.Default );
1187 _Thread_Lock_set_unprotected( the_thread, new_lock );
1191 #define _Thread_Lock_set( the_thread, new_lock ) \ 1202 #if defined(RTEMS_SMP) 1207 _Atomic_Fence( ATOMIC_ORDER_RELEASE );
1209 _Thread_Lock_set_unprotected( the_thread, &the_thread->Lock.Default );
1212 #define _Thread_Lock_restore_default( the_thread ) \ 1219 #define THREAD_WAIT_FLAGS_INITIAL 0x0U 1224 #define THREAD_WAIT_STATE_MASK 0xffU 1233 #define THREAD_WAIT_STATE_INTEND_TO_BLOCK 0x1U 1238 #define THREAD_WAIT_STATE_BLOCKED 0x2U 1245 #define THREAD_WAIT_STATE_READY_AGAIN 0x4U 1250 #define THREAD_WAIT_CLASS_MASK 0xff00U 1255 #define THREAD_WAIT_CLASS_EVENT 0x100U 1260 #define THREAD_WAIT_CLASS_SYSTEM_EVENT 0x200U 1265 #define THREAD_WAIT_CLASS_OBJECT 0x400U 1272 #if defined(RTEMS_SMP) 1273 _Atomic_Store_uint( &the_thread->
Wait.
flags, flags, ATOMIC_ORDER_RELAXED );
1283 #if defined(RTEMS_SMP) 1284 return _Atomic_Load_uint( &the_thread->
Wait.
flags, ATOMIC_ORDER_RELAXED );
1310 #if defined(RTEMS_SMP) 1311 return _Atomic_Compare_exchange_uint(
1315 ATOMIC_ORDER_RELAXED,
1316 ATOMIC_ORDER_RELAXED
1319 bool success = the_thread->
Wait.
flags == expected_flags;
1341 #if !defined(RTEMS_SMP) 1344 _ISR_Disable_without_giant( level );
1353 #if !defined(RTEMS_SMP) 1354 _ISR_Enable_without_giant( level );
1420 uint32_t timeout_code
1439 #if defined(RTEMS_SMP) && defined(RTEMS_DEBUG) 1440 the_thread->
Scheduler.debug_real_cpu = cpu;
1447 #if !defined(__DYNAMIC_REENT__) 1462 struct _reent **libc_reent
1465 _Thread_libc_reent = libc_reent;
1475 #if defined(RTEMS_MULTIPROCESSING) #define _Thread_Lock_set(the_thread, new_lock)
Sets a new thread lock.
Definition: threadimpl.h:1191
void(* Thread_Action_handler)(Thread_Control *thread, Thread_Action *action, struct Per_CPU_Control *cpu, ISR_Level level)
Thread action handler.
Definition: thread.h:456
Constants and Prototypes Related to the Internal Error Handler.
Thread_Control * _Thread_Get(Objects_Id id, Objects_Locations *location)
Maps thread Id to a TCB pointer.
Definition: threadget.c:56
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 priori...
Definition: threadimpl.h:351
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).
Definition: threadimpl.h:1021
void _Thread_Stack_Free(Thread_Control *the_thread)
Deallocate thread stack.
Definition: threadstackfree.c:24
RTEMS_INLINE_ROUTINE bool _Thread_Is_proxy_blocking(uint32_t code)
Is proxy blocking.
Definition: threadimpl.h:713
Scheduler control.
Definition: scheduler.h:192
Objects_Control * _Objects_Allocate_unprotected(Objects_Information *information)
Allocates an object without locking the allocator mutex.
Definition: objectallocate.c:39
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...
Definition: threadimpl.h:600
RTEMS_INLINE_ROUTINE void _Thread_Unblock(Thread_Control *the_thread)
This routine clears any blocking state for the_thread.
Definition: threadimpl.h:588
#define THREAD_STATUS_PROXY_BLOCKING
The following structure contains the information necessary to manage a thread which it is waiting for...
Definition: threadimpl.h:50
#define _ISR_lock_ISR_disable_and_acquire(_lock, _context)
Acquires an ISR lock.
Definition: isrlock.h:205
Thread_Control * _Thread_Get_interrupt_disable(Objects_Id id, Objects_Locations *location, ISR_lock_Context *lock_context)
Gets a thread by its identifier.
Definition: threadget.c:78
struct Thread_Control * heir
This is the heir thread for this processor.
Definition: percpu.h:292
void _Thread_Handler(void)
Wrapper function for all threads.
Definition: threadhandler.c:27
void * _Thread_Global_construction(void)
Executes the global constructors and then restarts itself as the first initialization thread...
Definition: threadglobalconstruction.c:49
#define _ISR_lock_Acquire(_lock, _context)
Acquires an ISR lock inside an ISR disabled section.
Definition: isrlock.h:257
Data Related to the Management of Processor Interrupt Levels.
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
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...
Definition: threadimpl.h:517
#define _Context_Save_fp(_fp)
Save floating point context area.
Definition: context.h:162
RTEMS_INLINE_ROUTINE void _Thread_Lock_release(ISR_lock_Control *lock, ISR_lock_Context *lock_context)
Releases the thread lock.
Definition: threadimpl.h:1035
#define STATES_BLOCKED
This macro corresponds to a task waiting which is blocked.
Definition: statesimpl.h:109
bool(* Thread_Change_priority_filter)(Thread_Control *the_thread, Priority_Control *new_priority, void *arg)
Filters a thread priority change.
Definition: threadimpl.h:372
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). ...
Definition: threadimpl.h:985
void _Thread_Close(Thread_Control *the_thread, Thread_Control *executing)
Closes the thread.
Definition: threadrestart.c:311
void _Thread_Create_idle(void)
Create idle thread.
Definition: threadcreateidle.c:72
RTEMS_INLINE_ROUTINE struct _reent ** _Thread_Get_libc_reent(void)
This routine returns the C library re-enterant pointer.
Definition: threadimpl.h:1452
This is the structure used to manage sets of tasks which are blocked waiting to acquire a resource...
Definition: threadq.h:171
RTEMS_INLINE_ROUTINE ISR_lock_Control * _Thread_Lock_acquire(Thread_Control *the_thread, ISR_lock_Context *lock_context)
Acquires the thread lock.
Definition: threadimpl.h:1093
#define _Context_Restore_fp(_fp)
Restore floating point context area.
Definition: context.h:151
void _Thread_Handler_initialization(void)
Initialize thread handler.
Definition: thread.c:43
void _Thread_Delay_ended(Objects_Id id, void *ignored)
Ended the delay of a thread.
#define _ISR_Get_level()
Return current interrupt level.
Definition: isrlevel.h:120
void _Thread_Raise_priority(Thread_Control *the_thread, Priority_Control new_priority)
Raises the priority of a thread.
Definition: threadchangepriority.c:99
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(Chain_Control *the_chain)
Initialize this chain as empty.
Definition: chainimpl.h:613
void _Thread_Start_multitasking(void)
Start thread multitasking.
Definition: threadstartmultitasking.c:23
ISR lock control.
Definition: isrlock.h:56
Thread queue operations.
Definition: threadq.h:118
Constants and Structures Related with the Thread Control Block.
SCORE_EXTERN struct _reent ** _Thread_libc_reent
The C library re-enter-rant global pointer.
Definition: threadimpl.h:78
void _Thread_Enable_dispatch(void)
Enables thread dispatching and releases the Giant lock.
Thread_CPU_usage_t cpu_time_used
This field is the amount of CPU time consumed by this thread since it was created.
Definition: thread.h:777
uint32_t Priority_Control
The following type defines the control block used to manage thread priorities.
Definition: priority.h:56
Thread_Scheduler_control Scheduler
Scheduler related control.
Definition: thread.h:756
States_Control _Thread_Set_state(Thread_Control *the_thread, States_Control state)
Sets the specified thread state.
Definition: threadsetstate.c:28
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch(void)
Disables thread dispatching and acquires the Giant lock.
Definition: threaddispatch.h:332
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.
Definition: threadimpl.h:1334
#define rtems_configuration_get_maximum_processors()
Returns the configured maximum count of processors.
Definition: config.h:381
#define _ISR_lock_ISR_disable(_context)
Disables interrupts and saves the previous interrupt state in the ISR lock context.
Definition: isrlock.h:337
RTEMS_INLINE_ROUTINE void _Thread_Wait_restore_default_operations(Thread_Control *the_thread)
Restores the default thread queue operations.
Definition: threadimpl.h:1405
RTEMS_INLINE_ROUTINE void _Thread_Lock_acquire_default(Thread_Control *the_thread, ISR_lock_Context *lock_context)
Acquires the default thread lock.
Definition: threadimpl.h:1003
void(* Thread_CPU_budget_algorithm_callout)(Thread_Control *)
This defines thes the entry point for the thread specific timeslice budget management algorithm...
Definition: thread.h:173
Objects_Control Object
This field is the object management structure for each thread.
Definition: thread.h:673
uint32_t ISR_Level
The following type defines the control block used to manage the interrupt level portion of the status...
Definition: isrlevel.h:42
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. ...
Definition: threadimpl.h:575
RTEMS_INLINE_ROUTINE void _Thread_Wait_set_operations(Thread_Control *the_thread, const Thread_queue_Operations *new_operations)
Sets the thread queue operations.
Definition: threadimpl.h:1388
Control block to manage thread actions.
Definition: thread.h:490
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
#define _ISR_lock_ISR_enable(_context)
Restores the saved interrupt state of the ISR lock context.
Definition: isrlock.h:358
Per CPU Core Structure.
Definition: percpu.h:233
void _Thread_Load_environment(Thread_Control *the_thread)
Initializes enviroment for a thread.
Definition: threadloadenv.c:24
#define _Thread_Lock_restore_default(the_thread)
Restores the default thread lock.
Definition: threadimpl.h:1212
#define _ISR_lock_Release(_lock, _context)
Releases an ISR lock inside an ISR disabled section.
Definition: isrlock.h:279
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.
Definition: threadsetpriority.c:45
Thread action.
Definition: thread.h:480
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 flo...
Definition: threadimpl.h:626
Thread_Life_state
Thread life states.
Definition: thread.h:501
Thread_Start_types
The following defines the ways in which the entry point for a thread can be invoked.
Definition: thread.h:119
uint32_t resource_count
This field is the number of mutexes currently held by this thread.
Definition: thread.h:713
Context_Control_fp * fp_context
This field points to the floating point context for this thread.
Definition: thread.h:792
Constants and Structures Associated with the Manipulation of Objects.
RTEMS_INLINE_ROUTINE time_t _Timestamp_Add_to(Timestamp_Control *_time, const Timestamp_Control *_add)
Adds two timestamps.
Definition: timestamp.h:181
RTEMS_INLINE_ROUTINE void _Thread_Wait_set_queue(Thread_Control *the_thread, Thread_queue_Control *new_queue)
Sets the thread queue.
Definition: threadimpl.h:1370
#define STATES_ALL_SET
All state bits set to one (provided for _Thread_Ready())
Definition: statesimpl.h:119
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
Definition: assert.h:83
RTEMS_INLINE_ROUTINE bool _Thread_Owns_resources(const Thread_Control *the_thread)
Returns true if the thread owns resources, and false otherwise.
Definition: threadimpl.h:938
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). ...
Definition: threadimpl.h:1054
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 sens...
Definition: threadimpl.h:339
Inlined Routines Associated with Thread State Information.
volatile bool dispatch_necessary
This is set to true when this processor needs to run the dispatcher.
Definition: percpu.h:308
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.
struct bintime Timestamp_Control
Define the Timestamp control type.
Definition: timestamp.h:55
void _Thread_Kill_zombies(void)
Kills all zombie threads in the system.
Definition: threadrestart.c:149
Definition: inftrees.h:25
SCORE_EXTERN void * rtems_ada_self
Self for the GNU Ada Run-Time.
Definition: threadimpl.h:55
RTEMS_INLINE_ROUTINE void _Timestamp_Subtract(const Timestamp_Control *_start, const Timestamp_Control *_end, Timestamp_Control *_result)
Subtracts two timestamps.
Definition: timestamp.h:206
uint32_t States_Control
The following type defines the control block used to manage a thread's state.
Definition: states.h:41
struct Thread_Control * executing
This is the thread executing on this processor.
Definition: percpu.h:278
Context_Control Registers
This field contains the context of this thread.
Definition: thread.h:787
#define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
The following macro is a compiler specific way to indicate that the method will NOT return to the cal...
Definition: basedefs.h:162
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 i...
Definition: threadimpl.h:545
Objects_Locations
This enumerated type lists the locations which may be returned by _Objects_Get.
Definition: objectimpl.h:117
CPU_Uint32ptr Thread_Entry_numeric_type
Type of the numeric argument of a thread entry function with at least one numeric argument...
Definition: thread.h:110
System State Handler API.
size_t _Thread_Stack_Allocate(Thread_Control *the_thread, size_t stack_size)
Allocate the requested stack space for the thread.
Definition: threadstackallocate.c:26
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.
Definition: threadchangepriority.c:25
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp(void)
This routine is invoked when the currently loaded floating point context is now longer associated wit...
Definition: threadimpl.h:681
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).
Definition: threadimpl.h:1304
void _Thread_Restore_priority(Thread_Control *the_thread)
Sets the current to the real priority of a thread.
Definition: threadchangepriority.c:126
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(Chain_Node *node)
Set off chain.
Definition: chainimpl.h:230
Timestamp_Control time_of_last_context_switch
This is the time of the last context switch on this CPU.
Definition: percpu.h:311
States_Control _Thread_Clear_state(Thread_Control *the_thread, States_Control state)
Clears the specified thread state.
Definition: threadclearstate.c:25
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
void _Thread_Timeout(Objects_Id id, void *arg)
General purpose thread wait timeout.
Definition: threadtimeout.c:36
Inlined Routines in the Object Handler.
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary(void)
This function returns true if dispatching is disabled, and false otherwise.
Definition: threadimpl.h:692
Multiprocessing Portion of the Thread Package.
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.
Definition: threadimpl.h:962
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
The following type defines the control block used to manage object names.
Definition: object.h:68
#define SCORE_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:81
RTEMS_INLINE_ROUTINE void _Thread_Ready(Thread_Control *the_thread)
Clears all thread states.
Definition: threadimpl.h:274
RTEMS_INLINE_ROUTINE void _Thread_Lock_release_default(Thread_Control *the_thread, ISR_lock_Context *lock_context)
Releases the default thread lock.
Definition: threadimpl.h:1076
RTEMS_INLINE_ROUTINE void _Chain_Append_if_is_off_chain_unprotected(Chain_Control *the_chain, Chain_Node *the_node)
Append a node on the end of a chain if the node is in the off chain state (unprotected).
Definition: chainimpl.h:766
Thread_Wait_information Wait
This field is the blocking information for this thread.
Definition: thread.h:715
SCORE_EXTERN Thread_Control * _Thread_Allocated_fp
The following points to the thread whose floating point context is currently loaded.
Definition: threadimpl.h:68
#define _ISR_Disable(_level)
Disables interrupts on this processor.
Definition: isrlevel.h:58
SCORE_EXTERN Objects_Information _Thread_Internal_information
The following defines the information control block used to manage this class of objects.
Definition: threadimpl.h:61
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.
Definition: threadimpl.h:752
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent(struct _reent **libc_reent)
This routine set the C library re-enterant pointer.
Definition: threadimpl.h:1461
RTEMS_INLINE_ROUTINE void _Thread_Wait_set_timeout_code(Thread_Control *the_thread, uint32_t timeout_code)
Sets the thread wait timeout code.
Definition: threadimpl.h:1418
RTEMS_INLINE_ROUTINE bool _Thread_Is_null(const Thread_Control *the_thread)
This function returns true if the_thread is NULL and false otherwise.
Definition: threadimpl.h:701
Thread_CPU_budget_algorithms
The following lists the algorithms used to manage the thread cpu budget.
Definition: thread.h:159
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.
Definition: threadstart.c:27
unsigned int Thread_Wait_flags
This type is able to contain several flags used to control the wait class and state of a thread...
Definition: thread.h:277
Objects_Id id
This is the object's ID.
Definition: object.h:236