[rtems commit] score: Use RTEMS_UNREACHABLE()

Sebastian Huber sebh at rtems.org
Wed Mar 23 06:54:26 UTC 2016


Module:    rtems
Branch:    master
Commit:    d67c8697664de259f09f38436702681b04db2763
Changeset: http://git.rtems.org/rtems/commit/?id=d67c8697664de259f09f38436702681b04db2763

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Mar 23 07:43:01 2016 +0100

score: Use RTEMS_UNREACHABLE()

The _CPU_Context_switch() in _Thread_Start_multitasking() does in fact
not return.

---

 cpukit/score/src/threadstartmultitasking.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cpukit/score/src/threadstartmultitasking.c b/cpukit/score/src/threadstartmultitasking.c
index 9fd2535..291e42c 100644
--- a/cpukit/score/src/threadstartmultitasking.c
+++ b/cpukit/score/src/threadstartmultitasking.c
@@ -19,6 +19,7 @@
 #endif
 
 #include <rtems/score/threadimpl.h>
+#include <rtems/score/assert.h>
 
 void _Thread_Start_multitasking( void )
 {
@@ -57,6 +58,7 @@ void _Thread_Start_multitasking( void )
      */
     _CPU_Context_Set_is_executing( &trash, true );
     _CPU_Context_switch( &trash, &heir->Registers );
+    RTEMS_UNREACHABLE();
   }
 #else
   _CPU_Context_Restart_self( &heir->Registers );




More information about the vc mailing list