summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline/rtems/score/states.inl
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-22 21:26:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-22 21:26:30 +0000
commitcdea6170559416ef3c4b972a6006f1929ca67446 (patch)
treebdf0f39aea5ff3821ee614bc9cdb11f525fc4941 /cpukit/score/inline/rtems/score/states.inl
parent2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-cdea6170559416ef3c4b972a6006f1929ca67446.tar.bz2
2009-07-22 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/inline/rtems/score/states.inl: Add _States_Is_interruptible_by_signal. Add more DOxygen comments and clean up.
Diffstat (limited to '')
-rw-r--r--cpukit/score/inline/rtems/score/states.inl128
1 files changed, 106 insertions, 22 deletions
diff --git a/cpukit/score/inline/rtems/score/states.inl b/cpukit/score/inline/rtems/score/states.inl
index 9108f7f334..6d286e31c7 100644
--- a/cpukit/score/inline/rtems/score/states.inl
+++ b/cpukit/score/inline/rtems/score/states.inl
@@ -1,12 +1,12 @@
/**
* @file rtems/score/states.inl
*
- * This file contains the macro implementation of the inlined
+ * This file contains the static inline implementation of the inlined
* routines associated with thread state information.
*/
/*
- * COPYRIGHT (c) 1989-2004.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,8 +31,12 @@
/**
* This function sets the given states_to_set into the current_state
* passed in. The result is returned to the user in current_state.
+ *
+ * @param[in] states_to_set is the state bits to set
+ * @param[in] current_state is the state set to add them to
+ *
+ * @return This method returns the updated states value.
*/
-
RTEMS_INLINE_ROUTINE States_Control _States_Set (
States_Control states_to_set,
States_Control current_state
@@ -44,8 +48,12 @@ RTEMS_INLINE_ROUTINE States_Control _States_Set (
/**
* This function clears the given states_to_clear into the current_state
* passed in. The result is returned to the user in current_state.
+ *
+ * @param[in] states_to_set is the state bits to clean
+ * @param[in] current_state is the state set to remove them from
+ *
+ * @return This method returns the updated states value.
*/
-
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
@@ -57,8 +65,11 @@ RTEMS_INLINE_ROUTINE States_Control _States_Clear (
/**
* This function returns true if the_states indicates that the
* state is READY, 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_ready (
States_Control the_states
)
@@ -69,8 +80,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_ready (
/**
* This function returns true if the DORMANT state is the ONLY state
* 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_only_dormant (
States_Control the_states
)
@@ -81,8 +95,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_only_dormant (
/**
* This function returns true if the DORMANT 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_dormant (
States_Control the_states
)
@@ -93,8 +110,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
/**
* This function returns true if the SUSPENDED 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_suspended (
States_Control the_states
)
@@ -105,8 +125,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
/**
* This function returns true if the TRANSIENT 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_transient (
States_Control the_states
)
@@ -117,8 +140,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_transient (
/**
* This function returns true if the DELAYING 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_delaying (
States_Control the_states
)
@@ -129,8 +155,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_delaying (
/**
* This function returns true if the WAITING_FOR_BUFFER 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_buffer (
States_Control the_states
)
@@ -141,8 +170,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_buffer (
/**
* This function returns true if the WAITING_FOR_SEGMENT 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_segment (
States_Control the_states
)
@@ -153,8 +185,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_segment (
/**
* This function returns true if the WAITING_FOR_MESSAGE 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_message (
States_Control the_states
)
@@ -165,8 +200,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_message (
/**
* This function returns true if the WAITING_FOR_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_event (
States_Control the_states
)
@@ -177,8 +215,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
/**
* This function returns true if the WAITING_FOR_MUTEX 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_mutex (
States_Control the_states
)
@@ -189,8 +230,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_mutex (
/**
* This function returns true if the WAITING_FOR_SEMAPHORE 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_semaphore (
States_Control the_states
)
@@ -201,8 +245,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_semaphore (
/**
* This function returns true if the WAITING_FOR_TIME 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_time (
States_Control the_states
)
@@ -213,8 +260,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_time (
/**
* This function returns true if the WAITING_FOR_TIME 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_rpc_reply (
States_Control the_states
)
@@ -225,8 +275,11 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_rpc_reply (
/**
* This function returns true if the WAITING_FOR_PERIOD 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_period (
States_Control the_states
)
@@ -235,9 +288,28 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
}
/**
+ * This function returns true if the task's state is set in
+ * way that allows it to be interrupted by a signal.
+ *
+ * @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_interruptible_by_signal (
+ States_Control the_states
+)
+{
+ return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
+
+}
+/**
* This function returns true if one of the states which indicates
* that a task is blocked waiting for a local resource 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_locally_blocked (
@@ -251,8 +323,12 @@ RTEMS_INLINE_ROUTINE bool _States_Is_locally_blocked (
* This function returns true if one of the states which indicates
* that a task is blocked waiting for a local resource 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 state indicates that the
+ * assocated thread is waiting on a thread queue.
*/
-
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
@@ -263,8 +339,12 @@ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
/**
* This function returns true if one of the states which indicates
* that a task is blocked 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 state indicates that the
+ * assocated thread is blocked.
*/
-
RTEMS_INLINE_ROUTINE bool _States_Is_blocked (
States_Control the_states
)
@@ -275,8 +355,12 @@ RTEMS_INLINE_ROUTINE bool _States_Is_blocked (
/**
* This function returns true if any of the states in the mask
* are set in the_states, and false otherwise.
+ *
+ * @param[in] the_states is the task state set to test
+ * @param[in] mask is the state bits to test for
+ *
+ * @return This method returns true if the indicates state condition is set.
*/
-
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask