diff options
Diffstat (limited to 'cpukit/score/include/rtems/score/threadq.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadq.h | 112 |
1 files changed, 60 insertions, 52 deletions
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h index 48e951eef1..a4ad0827a3 100644 --- a/cpukit/score/include/rtems/score/threadq.h +++ b/cpukit/score/include/rtems/score/threadq.h @@ -95,11 +95,6 @@ typedef struct { } Thread_queue_Gate; #endif -/** - * @brief Thread queue context for the thread queue methods. - * - * @see _Thread_queue_Context_initialize(). - */ typedef struct { /** * @brief The lock context for the thread queue acquire and release @@ -107,50 +102,6 @@ typedef struct { */ ISR_lock_Context Lock_context; - /** - * @brief The expected thread dispatch disable level for - * _Thread_queue_Enqueue_critical(). - * - * In case the actual thread dispatch disable level is not equal to the - * expected level, then a fatal error occurs. - */ - uint32_t expected_thread_dispatch_disable_level; - - /** - * @brief The clock discipline for the interval timeout. - * Use WATCHDOG_NO_TIMEOUT to block indefinitely. - */ - Watchdog_Discipline timeout_discipline; - - /** - * @brief Interval to wait. - */ - uint64_t timeout; - - /** - * @brief Invoked in case of a detected deadlock. - * - * Must be initialized for _Thread_queue_Enqueue_critical() in case the - * thread queue may have an owner, e.g. for mutex objects. - * - * @see _Thread_queue_Context_set_deadlock_callout(). - */ - Thread_queue_Deadlock_callout deadlock_callout; - -#if defined(RTEMS_MULTIPROCESSING) - /** - * @brief Callout to unblock the thread in case it is actually a thread - * proxy. - * - * This field is only used on multiprocessing configurations. Used by - * thread queue extract and unblock methods for objects with multiprocessing - * (MP) support. - * - * @see _Thread_queue_Context_set_MP_callout(). - */ - Thread_queue_MP_callout mp_callout; -#endif - #if defined(RTEMS_SMP) /** * @brief Data to support thread queue enqueue operations. @@ -169,7 +120,7 @@ typedef struct { Thread_queue_Queue *queue; } Wait; #endif -} Thread_queue_Context; +} Thread_queue_Lock_context; #if defined(RTEMS_SMP) /** @@ -205,14 +156,71 @@ typedef struct { Thread_Control *owner; /** - * @brief The queue context used to acquire the thread wait lock of the + * @brief The queue lock context used to acquire the thread wait lock of the * owner. */ - Thread_queue_Context Queue_context; + Thread_queue_Lock_context Lock_context; } Thread_queue_Link; #endif /** + * @brief Thread queue context for the thread queue methods. + * + * @see _Thread_queue_Context_initialize(). + */ +typedef struct { + /** + * @brief The lock context for the thread queue acquire and release + * operations. + */ + Thread_queue_Lock_context Lock_context; + + /** + * @brief The expected thread dispatch disable level for + * _Thread_queue_Enqueue_critical(). + * + * In case the actual thread dispatch disable level is not equal to the + * expected level, then a fatal error occurs. + */ + uint32_t expected_thread_dispatch_disable_level; + + /** + * @brief The clock discipline for the interval timeout. + * Use WATCHDOG_NO_TIMEOUT to block indefinitely. + */ + Watchdog_Discipline timeout_discipline; + + /** + * @brief Interval to wait. + */ + uint64_t timeout; + + /** + * @brief Invoked in case of a detected deadlock. + * + * Must be initialized for _Thread_queue_Enqueue_critical() in case the + * thread queue may have an owner, e.g. for mutex objects. + * + * @see _Thread_queue_Context_set_deadlock_callout(). + */ + Thread_queue_Deadlock_callout deadlock_callout; + +#if defined(RTEMS_MULTIPROCESSING) + /** + * @brief Callout to unblock the thread in case it is actually a thread + * proxy. + * + * This field is only used on multiprocessing configurations. Used by + * thread queue extract and unblock methods for objects with multiprocessing + * (MP) support. + * + * @see _Thread_queue_Context_set_MP_callout(). + */ + Thread_queue_MP_callout mp_callout; +#endif +} Thread_queue_Context; + +/** * @brief Thread priority queue. */ typedef struct { |