diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-22 10:10:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-28 09:26:18 +0200 |
commit | e5120a566c432dbe2c29acc7e02131896d827c5f (patch) | |
tree | 01d6848c0091505b79d3bdaa094d9f92f4e2c758 /cpukit/score/cpu/no_cpu/rtems/score/cpu.h | |
parent | rtems: Account for the network semaphore. (diff) | |
download | rtems-e5120a566c432dbe2c29acc7e02131896d827c5f.tar.bz2 |
score: Add _CPU_Get_current_per_CPU_control()
Add optional method _CPU_Get_current_per_CPU_control() 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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/no_cpu/rtems/score/cpu.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h index 5241b5ba5d..959fb58a6d 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h @@ -1462,6 +1462,24 @@ CPU_Counter_ticks _CPU_Counter_difference( CPU_Counter_ticks first ); +/** + * @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 ) + #ifdef RTEMS_SMP /** * @brief Performs CPU specific SMP initialization in the context of the boot |