[rtems commit] rtems: Use _Per_CPU_Get_executing()

Sebastian Huber sebh at rtems.org
Thu Feb 8 12:38:13 UTC 2018


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb  8 10:46:11 2018 +0100

rtems: Use _Per_CPU_Get_executing()

---

 cpukit/rtems/src/taskwakeafter.c | 2 +-
 cpukit/rtems/src/taskwakewhen.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/rtems/src/taskwakeafter.c b/cpukit/rtems/src/taskwakeafter.c
index cf118dc..193c96f 100644
--- a/cpukit/rtems/src/taskwakeafter.c
+++ b/cpukit/rtems/src/taskwakeafter.c
@@ -34,7 +34,7 @@ rtems_status_code rtems_task_wake_after(
   Per_CPU_Control *cpu_self;
 
   cpu_self = _Thread_Dispatch_disable();
-    executing = _Thread_Executing;
+    executing = _Per_CPU_Get_executing( cpu_self );
 
     if ( ticks == 0 ) {
       _Thread_Yield( executing );
diff --git a/cpukit/rtems/src/taskwakewhen.c b/cpukit/rtems/src/taskwakewhen.c
index ac92ea8..221a1b9 100644
--- a/cpukit/rtems/src/taskwakewhen.c
+++ b/cpukit/rtems/src/taskwakewhen.c
@@ -49,7 +49,7 @@ rtems_status_code rtems_task_wake_when(
     return RTEMS_INVALID_CLOCK;
 
   cpu_self = _Thread_Dispatch_disable();
-    executing = _Thread_Executing;
+    executing = _Per_CPU_Get_executing( cpu_self );
     _Thread_Set_state( executing, STATES_WAITING_FOR_TIME );
     _Thread_Wait_flags_set( executing, THREAD_WAIT_STATE_BLOCKED );
     _Thread_Timer_insert_realtime(




More information about the vc mailing list