From 1eb6cdde60d702cb7a05927842a1752c133d9927 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 30 Apr 2021 16:58:50 +0200 Subject: score: Add _Thread_Dispatch_direct_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 _Thread_Dispatch_direct() to avoid generation of dead code. --- cpukit/score/src/threaddispatch.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpukit/score/src/threaddispatch.c') diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c index 2fd125dd76..fd3f4eda4d 100644 --- a/cpukit/score/src/threaddispatch.c +++ b/cpukit/score/src/threaddispatch.c @@ -358,6 +358,9 @@ void _Thread_Dispatch_direct( Per_CPU_Control *cpu_self ) _Thread_Do_dispatch( cpu_self, level ); } +RTEMS_ALIAS( _Thread_Dispatch_direct ) void +_Thread_Dispatch_direct_no_return( Per_CPU_Control * ); + void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self ) { uint32_t disable_level = cpu_self->thread_dispatch_disable_level; -- cgit v1.2.3