summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadrestart.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-13 13:20:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-20 07:49:37 +0200
commit7023d82ca6bdfe7e0fa1d1c10481671dd744d894 (patch)
tree0d87ccec13959b15d3f882af16969d62a4965e27 /cpukit/score/src/threadrestart.c
parentscore: Add Thread_Change_life() (diff)
downloadrtems-7023d82ca6bdfe7e0fa1d1c10481671dd744d894.tar.bz2
score: Add _Thread_Raise_real_priority()
Update #2555. Update #2626.
Diffstat (limited to 'cpukit/score/src/threadrestart.c')
-rw-r--r--cpukit/score/src/threadrestart.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index 1d131d4d51..fe9bca152e 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 );
}
}
}