19 #ifndef _RTEMS_SCORE_STATESIMPL_H 20 #define _RTEMS_SCORE_STATESIMPL_H 40 #define STATES_READY 0x00000 42 #define STATES_DORMANT 0x00001 44 #define STATES_SUSPENDED 0x00002 46 #define STATES_DELAYING 0x00008 48 #define STATES_WAITING_FOR_TIME 0x00010 50 #define STATES_WAITING_FOR_BUFFER 0x00020 52 #define STATES_WAITING_FOR_SEGMENT 0x00040 54 #define STATES_WAITING_FOR_MESSAGE 0x00080 56 #define STATES_WAITING_FOR_EVENT 0x00100 58 #define STATES_WAITING_FOR_SEMAPHORE 0x00200 60 #define STATES_WAITING_FOR_MUTEX 0x00400 62 #define STATES_WAITING_FOR_CONDITION_VARIABLE 0x00800 64 #define STATES_WAITING_FOR_JOIN_AT_EXIT 0x01000 66 #define STATES_WAITING_FOR_RPC_REPLY 0x02000 68 #define STATES_WAITING_FOR_PERIOD 0x04000 70 #define STATES_WAITING_FOR_SIGNAL 0x08000 72 #define STATES_WAITING_FOR_BARRIER 0x10000 74 #define STATES_WAITING_FOR_RWLOCK 0x20000 76 #define STATES_WAITING_FOR_SYSTEM_EVENT 0x40000 78 #define STATES_WAITING_FOR_BSD_WAKEUP 0x80000 80 #define STATES_WAITING_FOR_TERMINATION 0x100000 82 #define STATES_ZOMBIE 0x200000 84 #define STATES_MIGRATING 0x400000 86 #define STATES_RESTARTING 0x800000 88 #define STATES_WAITING_FOR_JOIN 0x1000000 93 #define STATES_INTERRUPTIBLE_BY_SIGNAL 0x10000000 96 #define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER | \ 97 STATES_WAITING_FOR_SEGMENT | \ 98 STATES_WAITING_FOR_MESSAGE | \ 99 STATES_WAITING_FOR_SEMAPHORE | \ 100 STATES_WAITING_FOR_MUTEX | \ 101 STATES_WAITING_FOR_CONDITION_VARIABLE | \ 102 STATES_WAITING_FOR_JOIN | \ 103 STATES_WAITING_FOR_SIGNAL | \ 104 STATES_WAITING_FOR_BARRIER | \ 105 STATES_WAITING_FOR_BSD_WAKEUP | \ 106 STATES_WAITING_FOR_RWLOCK ) 109 #define STATES_BLOCKED ( STATES_DELAYING | \ 110 STATES_LOCALLY_BLOCKED | \ 111 STATES_WAITING_FOR_TIME | \ 112 STATES_WAITING_FOR_PERIOD | \ 113 STATES_WAITING_FOR_EVENT | \ 114 STATES_WAITING_FOR_RPC_REPLY | \ 115 STATES_WAITING_FOR_SYSTEM_EVENT | \ 116 STATES_INTERRUPTIBLE_BY_SIGNAL ) 119 #define STATES_ALL_SET 0xffffffff 135 return (current_state | states_to_set);
152 return (current_state & ~states_to_clear);
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event(States_Control the_states)
This function returns true if the WAITING_FOR_EVENT state is set in the_states, and false otherwise...
Definition: statesimpl.h:283
RTEMS_INLINE_ROUTINE bool _States_Is_locally_blocked(States_Control the_states)
This function returns true if one of the states which indicates that a task is blocked waiting for a ...
Definition: statesimpl.h:405
#define STATES_DELAYING
This macro corresponds to a task which is waiting for a timeout.
Definition: statesimpl.h:46
#define STATES_WAITING_FOR_BUFFER
This macro corresponds to a task waiting for a variable length buffer.
Definition: statesimpl.h:50
RTEMS_INLINE_ROUTINE bool _States_Is_dormant(States_Control the_states)
This function returns true if the DORMANT state is set in the_states, and false otherwise.
Definition: statesimpl.h:193
#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
#define STATES_BLOCKED
This macro corresponds to a task waiting which is blocked.
Definition: statesimpl.h:109
#define STATES_READY
This macro corresponds to a task being ready.
Definition: statesimpl.h:40
Thread Execution State Information.
#define STATES_WAITING_FOR_TIME
This macro corresponds to a task waiting until a specific TOD.
Definition: statesimpl.h:48
#define STATES_WAITING_FOR_SEGMENT
This macro corresponds to a task waiting for a fixed size segment.
Definition: statesimpl.h:52
#define STATES_WAITING_FOR_EVENT
This macro corresponds to a task waiting for an event.
Definition: statesimpl.h:56
#define STATES_WAITING_FOR_PERIOD
This macro corresponds to a task waiting for a period.
Definition: statesimpl.h:68
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_message(States_Control the_states)
This function returns true if the WAITING_FOR_MESSAGE state is set in the_states, and false otherwise...
Definition: statesimpl.h:268
#define STATES_LOCALLY_BLOCKED
This macro corresponds to a task waiting for a local object operation.
Definition: statesimpl.h:96
#define STATES_DORMANT
This macro corresponds to a task being created but not yet started.
Definition: statesimpl.h:42
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_system_event(States_Control the_states)
This function returns true if the WAITING_FOR_SYSTEM_EVENT state is set in the_states, and false otherwise.
Definition: statesimpl.h:298
RTEMS_INLINE_ROUTINE bool _States_Is_blocked(States_Control the_states)
This function returns true if one of the states which indicates that a task is blocked is set in the_...
Definition: statesimpl.h:421
#define STATES_WAITING_FOR_MESSAGE
This macro corresponds to a task waiting for a message.
Definition: statesimpl.h:54
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_mutex(States_Control the_states)
This function returns true if the WAITING_FOR_MUTEX state is set in the_states, and false otherwise...
Definition: statesimpl.h:313
RTEMS_INLINE_ROUTINE bool _States_Is_only_dormant(States_Control the_states)
This function returns true if the DORMANT state is the ONLY state set in the_states, and false otherwise.
Definition: statesimpl.h:178
RTEMS_INLINE_ROUTINE bool _States_Is_suspended(States_Control the_states)
This function returns true if the SUSPENDED state is set in the_states, and false otherwise...
Definition: statesimpl.h:208
RTEMS_INLINE_ROUTINE bool _States_Are_set(States_Control the_states, States_Control mask)
This function returns true if any of the states in the mask are set in the_states, and false otherwise.
Definition: statesimpl.h:437
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal(States_Control the_states)
This function returns true if the task's state is set in way that allows it to be interrupted by a si...
Definition: statesimpl.h:388
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period(States_Control the_states)
This function returns true if the WAITING_FOR_PERIOD state is set in the_states, and false otherwise...
Definition: statesimpl.h:373
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_semaphore(States_Control the_states)
This function returns true if the WAITING_FOR_SEMAPHORE state is set in the_states, and false otherwise.
Definition: statesimpl.h:328
RTEMS_INLINE_ROUTINE States_Control _States_Clear(States_Control states_to_clear, States_Control current_state)
This function clears the given states_to_clear into the current_state passed in.
Definition: statesimpl.h:147
uint32_t States_Control
The following type defines the control block used to manage a thread's state.
Definition: states.h:41
#define STATES_SUSPENDED
This macro corresponds to a task being suspended.
Definition: statesimpl.h:44
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_rpc_reply(States_Control the_states)
This function returns true if the WAITING_FOR_TIME state is set in the_states, and false otherwise...
Definition: statesimpl.h:358
#define STATES_WAITING_FOR_SEMAPHORE
This macro corresponds to a task waiting for a semaphore.
Definition: statesimpl.h:58
RTEMS_INLINE_ROUTINE bool _States_Is_ready(States_Control the_states)
This function returns true if the_states indicates that the state is READY, and false otherwise...
Definition: statesimpl.h:163
#define STATES_WAITING_FOR_MUTEX
This macro corresponds to a task waiting for a mutex.
Definition: statesimpl.h:60
#define STATES_WAITING_FOR_RPC_REPLY
This macro corresponds to a task waiting for a reply to an MPCI request.
Definition: statesimpl.h:66
#define STATES_WAITING_FOR_SYSTEM_EVENT
This macro corresponds to a task waiting for a system event.
Definition: statesimpl.h:76
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_segment(States_Control the_states)
This function returns true if the WAITING_FOR_SEGMENT state is set in the_states, and false otherwise...
Definition: statesimpl.h:253
RTEMS_INLINE_ROUTINE bool _States_Is_delaying(States_Control the_states)
This function returns true if the DELAYING state is set in the_states, and false otherwise.
Definition: statesimpl.h:223
#define STATES_INTERRUPTIBLE_BY_SIGNAL
This macro corresponds to a task which is in an interruptible blocking state.
Definition: statesimpl.h:93
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_buffer(States_Control the_states)
This function returns true if the WAITING_FOR_BUFFER state is set in the_states, and false otherwise...
Definition: statesimpl.h:238
RTEMS_INLINE_ROUTINE States_Control _States_Set(States_Control states_to_set, States_Control current_state)
This function sets the given states_to_set into the current_state passed in.
Definition: statesimpl.h:130
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_time(States_Control the_states)
This function returns true if the WAITING_FOR_TIME state is set in the_states, and false otherwise...
Definition: statesimpl.h:343