summaryrefslogtreecommitdiffstats
path: root/cpukit/include
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/include
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 'cpukit/include')
-rw-r--r--cpukit/include/rtems/score/threaddispatch.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/threaddispatch.h b/cpukit/include/rtems/score/threaddispatch.h
index 707b449771..7f3673a0d5 100644
--- a/cpukit/include/rtems/score/threaddispatch.h
+++ b/cpukit/include/rtems/score/threaddispatch.h
@@ -126,6 +126,17 @@ void _Thread_Dispatch( void );
void _Thread_Dispatch_direct( Per_CPU_Control *cpu_self );
/**
+ * @brief Directly do a thread dispatch and do not return.
+ *
+ * @param cpu_self is the current processor.
+ *
+ * @see _Thread_Dispatch_direct().
+ */
+RTEMS_NO_RETURN void _Thread_Dispatch_direct_no_return(
+ Per_CPU_Control *cpu_self
+);
+
+/**
* @brief Performs a thread dispatch on the current processor.
*
* On entry the thread dispatch disable level must be equal to one and