diff options
Diffstat (limited to 'cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h')
-rw-r--r-- | cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h b/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h index 457ce4c8bb..f1b03435ba 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2016 embedded brains GmbH. + * Copyright (c) 2015, 2016 embedded brains GmbH * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -24,6 +24,24 @@ extern "C" { #endif /** + * @brief Special register pointing to the per-CPU control of the current + * processor. + * + * This is optional. Not every CPU port needs this. It is only an optional + * optimization variant. + */ +register struct Per_CPU_Control *_CPU_Per_CPU_current asm( "rX" ); + +/** + * @brief Optional method to obtain the per-CPU control of the current processor. + * + * 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 using the current processor index will be used. + */ +#define _CPU_Get_current_per_CPU_control() ( _CPU_Per_CPU_current ) + +/** * @brief Optional method to get the executing thread. * * This is optional. Not every CPU port needs this. It is only an optional |