summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadq.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-10 07:52:19 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-12 13:24:38 +0200
commitaf20467ef46c4fd33b01e06268d1fb17c4cb5ea6 (patch)
treebc2ef138c989bdcd4600fbb95c3f4a4f70ef3265 /cpukit/score/include/rtems/score/threadq.h
parentposix: Make _POSIX_signals_Action_handler() static (diff)
downloadrtems-af20467ef46c4fd33b01e06268d1fb17c4cb5ea6.tar.bz2
score: Add _Thread_queue_Is_lock_owner()
Add _Thread_queue_Is_lock_owner() in case RTEMS_DEBUG is defined.
Diffstat (limited to '')
-rw-r--r--cpukit/score/include/rtems/score/threadq.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index fb2014833a..7ada3fc355 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -264,14 +264,37 @@ typedef struct {
* waiting to acquire a resource.
*/
typedef struct {
+#if defined(RTEMS_SMP)
+#if defined(RTEMS_DEBUG)
/**
- * @brief The actual thread queue.
+ * @brief The index of the owning processor of the thread queue lock.
+ *
+ * The thread queue lock may be acquired via the thread lock also. This path
+ * is not covered by this field. In case the lock is not owned directly via
+ * _Thread_queue_Acquire(), then the value of this field is
+ * SMP_LOCK_NO_OWNER.
+ *
+ * Must be before the queue component of this structure to be able to re-use
+ * implementation parts for structures defined by Newlib <sys/lock.h>.
*/
- Thread_queue_Queue Queue;
+ uint32_t owner;
+#endif
-#if defined(RTEMS_SMP) && defined(RTEMS_PROFILING)
+#if defined(RTEMS_PROFILING)
+ /**
+ * @brief SMP lock statistics in case SMP and profiling are enabled.
+ *
+ * Must be before the queue component of this structure to be able to re-use
+ * implementation parts for structures defined by Newlib <sys/lock.h>.
+ */
SMP_lock_Stats Lock_stats;
#endif
+#endif
+
+ /**
+ * @brief The actual thread queue.
+ */
+ Thread_queue_Queue Queue;
} Thread_queue_Control;
/**@}*/