[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
parent
2301e132
Please register or sign in to comment