[all-commits] [llvm/llvm-project] 943d19: [libc] Fix sched_getscheduler return value
Mikhail R. Gadelha via All-commits
all-commits at lists.llvm.org
Tue Aug 1 10:27:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 943d194fd90fc943fd0b99cf987c1b118f8edaad
https://github.com/llvm/llvm-project/commit/943d194fd90fc943fd0b99cf987c1b118f8edaad
Author: Mikhail R. Gadelha <mikhail at igalia.com>
Date: 2023-08-01 (Tue, 01 Aug 2023)
Changed paths:
M libc/src/sched/linux/sched_getscheduler.cpp
M libc/src/sched/linux/sched_setscheduler.cpp
M libc/test/src/sched/param_and_scheduler_test.cpp
Log Message:
-----------
[libc] Fix sched_getscheduler return value
This patch fixes the return time for sched_getscheduler which was set to
always zero. The syscall documentation, however, defines:
On success, sched_getscheduler() returns the policy for the thread (a
nonnegative integer).
I also changed the return type for sched_setscheduler, but this change
didn't impact and test case.
This patch also removes the duplicated code from param_and_scheduler_test.cpp
and adds SCHED_BATCH and SCHED_IDLE to the tests.
Reviewed By: michaelrj
Differential Revision: https://reviews.llvm.org/D156700
More information about the All-commits
mailing list