From a5aaf20a2d25846c2bfe78e286550fed38d2c111 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 10 Aug 2021 15:07:35 +0200 Subject: score: Replace priority prepend it with an enum Use the new Priority_Group_order enum instead of a boolean to indicated if a priority should be inserted as the first or last node into its priority group. This makes the code more expressive. It is also a bit more efficient since a branch in _Scheduler_Node_set_priority() is avoided and a simple bitwise or operation can be used. --- cpukit/posix/src/pthreadsetschedparam.c | 2 +- cpukit/posix/src/pthreadsetschedprio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c index e9be24b417..1c207e7887 100644 --- a/cpukit/posix/src/pthreadsetschedparam.c +++ b/cpukit/posix/src/pthreadsetschedparam.c @@ -96,7 +96,7 @@ static int _POSIX_Set_sched_param( _Thread_Priority_changed( the_thread, &the_thread->Real_priority, - false, + PRIORITY_GROUP_LAST, queue_context ); #if defined(RTEMS_POSIX_API) diff --git a/cpukit/posix/src/pthreadsetschedprio.c b/cpukit/posix/src/pthreadsetschedprio.c index 72c7dab273..ae2add6232 100644 --- a/cpukit/posix/src/pthreadsetschedprio.c +++ b/cpukit/posix/src/pthreadsetschedprio.c @@ -49,7 +49,7 @@ int pthread_setschedprio( pthread_t thread, int prio ) the_thread, &the_thread->Real_priority, new_priority, - true, + PRIORITY_GROUP_FIRST, &queue_context ); -- cgit v1.2.3