diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-04 13:28:23 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-07 07:39:42 +0100 |
commit | df48ed2cbab0adeb5efc1c90beee25011436689e (patch) | |
tree | 1cc1f2e67b074bd7613b37778c988013b5edc40f /cpukit/score/cpu/no_cpu/rtems/score | |
parent | score: Prevent assignment to _Thread_Executing (diff) | |
download | rtems-df48ed2cbab0adeb5efc1c90beee25011436689e.tar.bz2 |
score: Add optional _CPU_Get_thread_executing()
Diffstat (limited to 'cpukit/score/cpu/no_cpu/rtems/score')
-rw-r--r-- | cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h | 12 |
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 |