diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-10-15 11:21:31 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-23 11:00:28 +0100 |
commit | 3d6ebde1acab61e7c8fce1a1ed51517f7c2bf7c6 (patch) | |
tree | 53af30eda5f2f52317549afb9492b5a9f4cb7720 /cpukit/score/src/threadqenqueue.c | |
parent | score: Add SMP scheduler idle exchange callback (diff) | |
download | rtems-3d6ebde1acab61e7c8fce1a1ed51517f7c2bf7c6.tar.bz2 |
score: Add SMP scheduler make/clean sticky
This patch fixes the following broken behaviour:
While a thread is scheduled on a helping scheduler, while it does not
own a MrsP semaphore, if it obtains a MrsP semaphore, then no
scheduler node using an idle thread and the ceiling priority of the
semaphore is unblocked for the home scheduler.
This could lead to priority inversion issues and is not in line
with the MrsP protocol.
Introduce two new scheduler operations which are only enabled if
RTEMS_SMP is defined. The operations are used to make the scheduler
node of the home scheduler sticky and to clean the sticky property.
This helps to keep the sticky handing out of the frequently used
priority update operation.
Close #4532.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/threadqenqueue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c index 5fc357ec82..ed6c64543c 100644 --- a/cpukit/score/src/threadqenqueue.c +++ b/cpukit/score/src/threadqenqueue.c @@ -518,7 +518,7 @@ Status_Control _Thread_queue_Enqueue_sticky( ); _Thread_Priority_update( queue_context ); - _Thread_Priority_and_sticky_update( the_thread, 1 ); + _Thread_Priority_update_and_make_sticky( the_thread ); _Thread_Dispatch_enable( cpu_self ); while ( @@ -899,8 +899,8 @@ void _Thread_queue_Surrender_sticky( queue, &queue_context->Lock_context.Lock_context ); - _Thread_Priority_and_sticky_update( previous_owner, -1 ); - _Thread_Priority_and_sticky_update( new_owner, 0 ); + _Thread_Priority_update_and_clean_sticky( previous_owner ); + _Thread_Priority_update_ignore_sticky( new_owner ); _Thread_Dispatch_enable( cpu_self ); } #endif |