summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/thread.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-29 15:32:51 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-30 07:57:33 +0200
commitb6b25a9e68f2c34fe9cb5b69fc802b4b9f25d53b (patch)
treea7a2bf366f5635ade55c9afa5f445627ca7aa9d8 /cpukit/score/include/rtems/score/thread.h
parentscore: _CPU_SMP_Send_interrupt() documentation (diff)
downloadrtems-b6b25a9e68f2c34fe9cb5b69fc802b4b9f25d53b.tar.bz2
score: Fix thread lock on SMP configurations
Diffstat (limited to 'cpukit/score/include/rtems/score/thread.h')
-rw-r--r--cpukit/score/include/rtems/score/thread.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 4d498e5f3f..46c222ff52 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -666,7 +666,19 @@ typedef struct {
* of the actual RTEMS build configuration, e.g. profiling enabled or
* disabled.
*/
- SMP_ticket_lock_Control *current;
+ union {
+ /**
+ * @brief The current thread lock as an atomic unsigned integer pointer value.
+ */
+ Atomic_Uintptr atomic;
+
+ /**
+ * @brief The current thread lock as a normal pointer.
+ *
+ * Only provided for debugging purposes.
+ */
+ SMP_ticket_lock_Control *normal;
+ } current;
/**
* @brief The default thread lock in case the thread is not blocked on a
@@ -680,7 +692,7 @@ typedef struct {
*
* These statistics are used by the executing thread in case it acquires a
* thread lock. Thus the statistics are an aggregation of acquire and
- * release operations of diffent locks.
+ * release operations of different locks.
*/
SMP_lock_Stats Stats;
#endif