diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-17 13:35:42 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-18 08:02:50 +0200 |
commit | d45f87cf3599b3614ea4b126728aedeb51737695 (patch) | |
tree | ccd13083533329b75b02e80627948cc5fea77f94 /cpukit/score/cpu/arm/include/rtems | |
parent | score: Move _Thread_queue_Queue_get_name_and_id() (diff) | |
download | rtems-d45f87cf3599b3614ea4b126728aedeb51737695.tar.bz2 |
score: Add _CPU_Context_switch_no_return()
The __builtin_unreachable() cannot be used with current GCC versions to
tell the compiler that a function does not return to the caller, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151
Add a no return variant of _CPU_Context_switch() to avoid generation of
dead code in _Thread_Start_multitasking() if RTEMS was built with SMP
support enabled.
Diffstat (limited to 'cpukit/score/cpu/arm/include/rtems')
-rw-r--r-- | cpukit/score/cpu/arm/include/rtems/score/cpu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/score/cpu/arm/include/rtems/score/cpu.h b/cpukit/score/cpu/arm/include/rtems/score/cpu.h index e5b23e7100..dcda4d525c 100644 --- a/cpukit/score/cpu/arm/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/include/rtems/score/cpu.h @@ -465,6 +465,11 @@ void _CPU_ISR_install_vector( */ void _CPU_Context_switch( Context_Control *run, Context_Control *heir ); +RTEMS_NO_RETURN void _CPU_Context_switch_no_return( + Context_Control *executing, + Context_Control *heir +); + RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context ); #if defined(ARM_MULTILIB_ARCH_V7M) |