[rtems commit] score: Add _Thread_Raise_real_priority()

Sebastian Huber sebh at rtems.org
Fri May 20 05:57:31 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri May 13 13:20:07 2016 +0200

score: Add _Thread_Raise_real_priority()

Update #2555.
Update #2626.

---

 cpukit/score/src/threadrestart.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index 1d131d4..fe9bca1 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -70,6 +70,20 @@ static bool _Thread_Raise_real_priority_filter(
   return _Thread_Priority_less_than( current_priority, new_priority );
 }
 
+static void _Thread_Raise_real_priority(
+  Thread_Control   *the_thread,
+  Priority_Control  priority
+)
+{
+  _Thread_Change_priority(
+    the_thread,
+    priority,
+    NULL,
+    _Thread_Raise_real_priority_filter,
+    false
+  );
+}
+
 static void _Thread_Make_zombie( Thread_Control *the_thread )
 {
   ISR_lock_Context lock_context;
@@ -323,13 +337,7 @@ static void _Thread_Start_life_change(
   _Thread_Set_state( the_thread, STATES_RESTARTING );
   _Thread_queue_Extract_with_proxy( the_thread );
   _Thread_Timer_remove( the_thread );
-  _Thread_Change_priority(
-    the_thread,
-    priority,
-    NULL,
-    _Thread_Raise_real_priority_filter,
-    false
-  );
+  _Thread_Raise_real_priority( the_thread, priority );
   _Thread_Add_life_change_action( the_thread );
   _Thread_Ready( the_thread );
 }
@@ -360,13 +368,7 @@ static void _Thread_Request_life_change(
     _Thread_Clear_state( the_thread, STATES_SUSPENDED );
 
     if ( _Thread_Is_life_terminating( additional_life_state ) ) {
-      _Thread_Change_priority(
-        the_thread,
-        priority,
-        NULL,
-        _Thread_Raise_real_priority_filter,
-        false
-      );
+      _Thread_Raise_real_priority( the_thread, priority );
     }
   }
 }




More information about the vc mailing list