summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/no_cpu
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-04 13:28:23 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-07 07:39:42 +0100
commitdf48ed2cbab0adeb5efc1c90beee25011436689e (patch)
tree1cc1f2e67b074bd7613b37778c988013b5edc40f /cpukit/score/cpu/no_cpu
parentscore: Prevent assignment to _Thread_Executing (diff)
downloadrtems-df48ed2cbab0adeb5efc1c90beee25011436689e.tar.bz2
score: Add optional _CPU_Get_thread_executing()
Diffstat (limited to 'cpukit/score/cpu/no_cpu')
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h b/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h
index 6b8b601cb0..457ce4c8bb 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h
@@ -5,6 +5,8 @@
*/
/*
+ * Copyright (c) 2016 embedded brains GmbH.
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
@@ -21,6 +23,16 @@
extern "C" {
#endif
+/**
+ * @brief Optional method to get the executing thread.
+ *
+ * This is optional. Not every CPU port needs this. It is only an optional
+ * optimization variant. In case this macro is undefined, the default
+ * implementation uses the per-CPU information and the current processor index
+ * to get the executing thread.
+ */
+#define _CPU_Get_thread_executing() ( _CPU_Per_CPU_current->executing )
+
#ifdef __cplusplus
}
#endif