summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/sched.cpp
diff options
context:
space:
mode:
authorkleines Filmröllchen <filmroellchen@serenityos.org>2022-07-24 16:38:41 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-27 11:30:19 +0100
commit6dded99777419746f2dc8ccbc899a1527c121cb8 (patch)
tree400d91d735b6ca09ae943a37fe1e311f07083265 /Userland/Libraries/LibC/sched.cpp
parentce25bd858416fe088466ac451bacad46ced9ff31 (diff)
downloadserenity-6dded99777419746f2dc8ccbc899a1527c121cb8.zip
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.
Diffstat (limited to 'Userland/Libraries/LibC/sched.cpp')
-rw-r--r--Userland/Libraries/LibC/sched.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/sched.cpp b/Userland/Libraries/LibC/sched.cpp
index 4d1cb46737..914e2eee5b 100644
--- a/Userland/Libraries/LibC/sched.cpp
+++ b/Userland/Libraries/LibC/sched.cpp
@@ -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