diff options
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/include/rtems/score/states.h | 3 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/states.inl | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/states.h b/cpukit/score/include/rtems/score/states.h index eb4658e3be..f71bf9399e 100644 --- a/cpukit/score/include/rtems/score/states.h +++ b/cpukit/score/include/rtems/score/states.h @@ -81,6 +81,8 @@ typedef uint32_t States_Control; #define STATES_WAITING_FOR_BARRIER 0x10000 /** This macro corresponds to a task waiting for a RWLock. */ #define STATES_WAITING_FOR_RWLOCK 0x20000 +/** This macro corresponds to a task waiting for a system event. */ +#define STATES_WAITING_FOR_SYSTEM_EVENT 0x40000 /** This macro corresponds to a task which is in an interruptible * blocking state. @@ -110,6 +112,7 @@ typedef uint32_t States_Control; STATES_WAITING_FOR_TIME | \ STATES_WAITING_FOR_PERIOD | \ STATES_WAITING_FOR_EVENT | \ + STATES_WAITING_FOR_SYSTEM_EVENT | \ STATES_WAITING_ON_THREAD_QUEUE | \ STATES_INTERRUPTIBLE_BY_SIGNAL ) diff --git a/cpukit/score/inline/rtems/score/states.inl b/cpukit/score/inline/rtems/score/states.inl index 7bad0c9f12..f5d816a8d3 100644 --- a/cpukit/score/inline/rtems/score/states.inl +++ b/cpukit/score/inline/rtems/score/states.inl @@ -213,6 +213,21 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( } /** + * This function returns true if the WAITING_FOR_SYSTEM_EVENT state is set in + * the_states, and false otherwise. + * + * @param[in] the_states is the task state set to test + * + * @return This method returns true if the desired state condition is set. + */ +RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_system_event ( + States_Control the_states +) +{ + return (the_states & STATES_WAITING_FOR_SYSTEM_EVENT); +} + +/** * This function returns true if the WAITING_FOR_MUTEX state * is set in the_states, and false otherwise. * |