summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadqimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-07-27 13:19:17 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-07-30 09:11:17 +0200
commit12f93fbb13d37e6cc16149c4bbac1590e9b29a29 (patch)
treefd8e02672dfe5c4a5aeceadfb11d029bc3db94d0 /cpukit/score/include/rtems/score/threadqimpl.h
parentscore: Use a plain ticket lock for thread locks (diff)
downloadrtems-12f93fbb13d37e6cc16149c4bbac1590e9b29a29.tar.bz2
score: Add thread queue for self-contained objects
Diffstat (limited to 'cpukit/score/include/rtems/score/threadqimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/threadqimpl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threadqimpl.h b/cpukit/score/include/rtems/score/threadqimpl.h
index 22118aba61..3828f415a6 100644
--- a/cpukit/score/include/rtems/score/threadqimpl.h
+++ b/cpukit/score/include/rtems/score/threadqimpl.h
@@ -33,6 +33,24 @@ extern "C" {
*/
/**@{*/
+/**
+ * @brief Thread queue with a layout compatible to struct _Thread_queue_Queue
+ * defined in Newlib <sys/lock.h>.
+ */
+typedef struct {
+ Thread_queue_Queue Queue;
+
+#if !defined(RTEMS_SMP)
+ /*
+ * The struct _Thread_queue_Queue definition is independent of the RTEMS
+ * build configuration. Thus, the storage space for the SMP lock is always
+ * present. In SMP configurations, the SMP lock is contained in the
+ * Thread_queue_Queue.
+ */
+ unsigned int reserved[2];
+#endif
+} Thread_queue_Syslock_queue;
+
RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_initialize(
Thread_queue_Queue *queue
)