summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadrestart.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-30 16:58:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-02 18:41:26 +0200
commit1eb6cdde60d702cb7a05927842a1752c133d9927 (patch)
treef24323e68a85492b3043d9ec56422255a4185457 /cpukit/score/src/threadrestart.c
parentspmisc01: Test RTEMS_NOINIT (diff)
downloadrtems-1eb6cdde60d702cb7a05927842a1752c133d9927.tar.bz2
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.
Diffstat (limited to '')
-rw-r--r--cpukit/score/src/threadrestart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index 3c0190164e..364d67d04e 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -288,7 +288,7 @@ void _Thread_Life_action_handler(
if ( _Thread_Is_life_terminating( previous_life_state ) ) {
cpu_self = _Thread_Wait_for_join( executing, cpu_self );
_Thread_Make_zombie( executing );
- _Thread_Dispatch_direct( cpu_self );
+ _Thread_Dispatch_direct_no_return( cpu_self );
RTEMS_UNREACHABLE();
}
@@ -610,7 +610,7 @@ void _Thread_Restart_self(
_Thread_Wait_release_default( executing, lock_context );
_Thread_Priority_update( &queue_context );
- _Thread_Dispatch_direct( cpu_self );
+ _Thread_Dispatch_direct_no_return( cpu_self );
RTEMS_UNREACHABLE();
}