summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-02-08 10:47:16 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-02-08 11:20:40 +0100
commited24ed4e0ad3494bfa4d070c52fb2c24fb0fb784 (patch)
tree14884c89f2f2ba788e900140432ce8c6648b2df2 /cpukit/score/src
parentrtems: Use _Per_CPU_Get_executing() (diff)
downloadrtems-ed24ed4e0ad3494bfa4d070c52fb2c24fb0fb784.tar.bz2
Use _Thread_Dispatch_direct()
Use _Thread_Dispatch_direct() for operations that block the executing thread. This ensures that we get a fatal error (INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL) if we try to block in an invalid context, e.g. during system start or an interrupt handler.
Diffstat (limited to 'cpukit/score/src')
-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 0430ca0407..ae5c3382ae 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -300,7 +300,7 @@ static Per_CPU_Control *_Thread_Wait_for_join(
) {
_Thread_Set_state_locked( executing, STATES_WAITING_FOR_JOIN_AT_EXIT );
_Thread_State_release( executing, &lock_context );
- _Thread_Dispatch_enable( cpu_self );
+ _Thread_Dispatch_direct( cpu_self );
/* Let other threads run */
@@ -660,7 +660,7 @@ void _Thread_Restart_self(
_Thread_Wait_release_default( executing, lock_context );
_Thread_Priority_update( &queue_context );
- _Thread_Dispatch_enable( cpu_self );
+ _Thread_Dispatch_direct( cpu_self );
RTEMS_UNREACHABLE();
}