diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-12-23 16:02:07 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-01-11 08:16:27 +0100 |
commit | 9a448aabe65f2b85c7721098a3f68f0a99a6728b (patch) | |
tree | b513a68d98d7b9fa8dcabd914c8aeee6246d2e61 /cpukit/score/include/rtems | |
parent | score: Delete STATES_WAITING_FOR_BUFFER (diff) | |
download | rtems-9a448aabe65f2b85c7721098a3f68f0a99a6728b.tar.bz2 |
score: Add STATES_THREAD_QUEUE_WITH_IDENTIFIER
Add thread state bit to identify thread queues that are embedded in an
object with identifier.
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r-- | cpukit/score/include/rtems/score/coresemimpl.h | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/statesimpl.h | 27 |
2 files changed, 15 insertions, 14 deletions
diff --git a/cpukit/score/include/rtems/score/coresemimpl.h b/cpukit/score/include/rtems/score/coresemimpl.h index 20ca30b366..6082c3bd72 100644 --- a/cpukit/score/include/rtems/score/coresemimpl.h +++ b/cpukit/score/include/rtems/score/coresemimpl.h @@ -186,7 +186,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_semaphore_Seize( _Thread_queue_Context_set_thread_state( queue_context, - STATES_WAITING_FOR_SEMAPHORE + STATES_THREAD_QUEUE_WITH_IDENTIFIER | STATES_WAITING_FOR_SEMAPHORE ); _Thread_queue_Context_set_do_nothing_enqueue_callout( queue_context ); _Thread_queue_Enqueue( diff --git a/cpukit/score/include/rtems/score/statesimpl.h b/cpukit/score/include/rtems/score/statesimpl.h index 82bcd7908a..89187b7e27 100644 --- a/cpukit/score/include/rtems/score/statesimpl.h +++ b/cpukit/score/include/rtems/score/statesimpl.h @@ -82,22 +82,26 @@ extern "C" { #define STATES_LIFE_IS_CHANGING 0x00800000 /** This macro corresponds to a task waiting for a join. */ #define STATES_WAITING_FOR_JOIN 0x01000000 -/** This macro corresponds to a task waiting for a <sys/lock.h> mutex. */ -#define STATES_WAITING_FOR_SYS_LOCK_MUTEX 0x02000000 -/** This macro corresponds to a task waiting for a <sys/lock.h> semaphore. */ -#define STATES_WAITING_FOR_SYS_LOCK_SEMAPHORE 0x04000000 -/** This macro corresponds to a task waiting for a <sys/lock.h> futex. */ -#define STATES_WAITING_FOR_SYS_LOCK_FUTEX 0x08000000 +/** This macro corresponds to a task waiting for a futex. */ +#define STATES_WAITING_FOR_FUTEX 0x08000000 /** This macro corresponds to a task which is in an interruptible * blocking state. */ #define STATES_INTERRUPTIBLE_BY_SIGNAL 0x10000000 -/** This macro corresponds to a task waiting for a <sys/lock.h> condition. */ -#define STATES_WAITING_FOR_SYS_LOCK_CONDITION 0x20000000 + +/** + * @brief This macro corresponds to a task which is blocked on a thread queue + * embedded in an object with an identifier. + * + * This thread state bit is intended to ease debugging and improve system + * diagnostics, see _Thread_Wait_get_id(). + */ +#define STATES_THREAD_QUEUE_WITH_IDENTIFIER 0x80000000 /** This macro corresponds to a task waiting for a local object operation. */ -#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_SEGMENT | \ +#define STATES_LOCALLY_BLOCKED ( STATES_THREAD_QUEUE_WITH_IDENTIFIER | \ + STATES_WAITING_FOR_SEGMENT | \ STATES_WAITING_FOR_MESSAGE | \ STATES_WAITING_FOR_SEMAPHORE | \ STATES_WAITING_FOR_MUTEX | \ @@ -106,10 +110,7 @@ extern "C" { STATES_WAITING_FOR_SIGNAL | \ STATES_WAITING_FOR_BARRIER | \ STATES_WAITING_FOR_BSD_WAKEUP | \ - STATES_WAITING_FOR_SYS_LOCK_MUTEX | \ - STATES_WAITING_FOR_SYS_LOCK_SEMAPHORE | \ - STATES_WAITING_FOR_SYS_LOCK_FUTEX | \ - STATES_WAITING_FOR_SYS_LOCK_CONDITION | \ + STATES_WAITING_FOR_FUTEX | \ STATES_WAITING_FOR_RWLOCK ) /** This macro corresponds to a task waiting which is blocked. */ |