diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-03 07:43:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-30 14:36:18 +0200 |
commit | dfcc8bb2a6a0c9983a22268a933ef1f21a07eaaa (patch) | |
tree | e1f16d3c3cfec5716bdceec6425398c7b83eaafe /cpukit/score/include/rtems/score/threadq.h | |
parent | score: Use Newlib provided <machine/endian.h> (diff) | |
download | rtems-dfcc8bb2a6a0c9983a22268a933ef1f21a07eaaa.tar.bz2 |
score: Adjust thread queue layout
Adjust thread queue layout according to Newlib. This makes it possible
to use the same implementation for <sys/lock.h> and CORE mutexes in the
future.
Diffstat (limited to 'cpukit/score/include/rtems/score/threadq.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadq.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h index 27af89fa75..467462d2b8 100644 --- a/cpukit/score/include/rtems/score/threadq.h +++ b/cpukit/score/include/rtems/score/threadq.h @@ -155,26 +155,34 @@ typedef struct _Thread_queue_Heads { typedef struct { /** - * @brief The thread queue heads. - * - * This pointer is NULL, if and only if no threads are enqueued. The first - * thread to enqueue will give its spare thread queue heads to this thread - * queue. - */ - Thread_queue_Heads *heads; - - /** * @brief Lock to protect this thread queue. * * It may be used to protect additional state of the object embedding this * thread queue. * + * Must be the first component of this structure to be able to re-use + * implementation parts for structures defined by Newlib <sys/lock.h>. + * * @see _Thread_queue_Acquire(), _Thread_queue_Acquire_critical() and * _Thread_queue_Release(). */ #if defined(RTEMS_SMP) SMP_ticket_lock_Control Lock; #endif + + /** + * @brief The thread queue heads. + * + * This pointer is NULL, if and only if no threads are enqueued. The first + * thread to enqueue will give its spare thread queue heads to this thread + * queue. + */ + Thread_queue_Heads *heads; + + /** + * @brief The thread queue owner. + */ + Thread_Control *owner; } Thread_queue_Queue; /** |