[libc-commits] [PATCH] D156700: [libc] Fix sched_getscheduler return value
Mikhail Ramalho via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jul 31 08:27:47 PDT 2023
mikhail.ramalho created this revision.
Herald added subscribers: libc-commits, asb, javed.absar.
Herald added projects: libc-project, All.
mikhail.ramalho requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156700
Files:
libc/src/sched/linux/sched_getscheduler.cpp
libc/src/sched/linux/sched_setscheduler.cpp
libc/test/src/sched/param_and_scheduler_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156700.545681.patch
Type: text/x-patch
Size: 14657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230731/b0d86d48/attachment-0001.bin>
More information about the libc-commits
mailing list