From df48ed2cbab0adeb5efc1c90beee25011436689e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 4 Nov 2016 13:28:23 +0100 Subject: score: Add optional _CPU_Get_thread_executing() --- cpukit/score/cpu/no_cpu/rtems/score/cpuimpl.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cpukit/score/cpu/no_cpu') 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 -- cgit v1.2.3