From 300f6a481aaf9e6d29811faca71bf7104a01492c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 22 Jun 2016 17:09:23 +0200 Subject: score: Rework thread priority management Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556. --- cpukit/score/src/threadmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cpukit/score/src/threadmp.c') diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c index cbb6c1c6b1..49e1c27979 100644 --- a/cpukit/score/src/threadmp.c +++ b/cpukit/score/src/threadmp.c @@ -80,6 +80,7 @@ void _Thread_MP_Handler_initialization ( #endif proxy->Scheduler.node = &proxy->Scheduler_node; _Scheduler_Node_do_initialize( + _Scheduler_Get_by_CPU_index( 0 ), &proxy->Scheduler_node, (Thread_Control *) proxy, 0 @@ -150,7 +151,7 @@ Thread_Control *_Thread_MP_Allocate_proxy ( the_proxy->receive_packet = receive_packet; the_proxy->Object.id = source_tid; - the_proxy->current_priority = receive_packet->source_priority; + the_proxy->Real_priority.priority = receive_packet->source_priority; the_proxy->current_state = _States_Set( STATES_DORMANT, the_state ); the_proxy->Wait.count = executing->Wait.count; -- cgit v1.2.3