1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

Kernel+LibC: Report correct scheduling priority limits

The priority range was changed several years ago, but the
userland-reported limits were just forgotten :skeleyak:. Move the thread
priority constants into an API header so that userland can use it
properly.
This commit is contained in:
kleines Filmröllchen 2022-07-24 16:38:41 +02:00 committed by Linus Groh
parent ce25bd8584
commit 6dded99777
3 changed files with 9 additions and 8 deletions

View file

@ -20,13 +20,13 @@ int sched_yield()
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_get_priority_min.html
int sched_get_priority_min([[maybe_unused]] int policy)
{
return 0; // Idle
return THREAD_PRIORITY_MIN;
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_get_priority_max.html
int sched_get_priority_max([[maybe_unused]] int policy)
{
return 3; // High
return THREAD_PRIORITY_MAX;
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_setparam.html