summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-10-26 10:05:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-10-30 18:03:02 +0100
commit0edf263139088e8ac0ff1f0d52513f6fc85677d2 (patch)
tree62f376215aa7ae30aa77e9386c2191ae20b70258 /cpukit/score
parentrtems: Reusable event implementation (diff)
downloadrtems-0edf263139088e8ac0ff1f0d52513f6fc85677d2.tar.bz2
rtems: Add system events
System events are similar to normal events. They offer a second set of events. These events are intended for internal RTEMS use and should not be used by applications (with the exception of the transient system event).
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/states.h3
-rw-r--r--cpukit/score/inline/rtems/score/states.inl15
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.
*