summaryrefslogtreecommitdiff
path: root/libc/src
diff options
context:
space:
mode:
authorTal Zussman <tz2294@columbia.edu>2023-04-25 16:14:43 -0700
committerMichael Jones <michaelrj@google.com>2023-04-25 16:17:47 -0700
commit97a03eb2eb5acf269db6253fe540626b52950f97 (patch)
treefc15805b21861317ed1bd2b272c819b953237492 /libc/src
parent404c63184e12fc98dadce8b28a8cca1570b1d15e (diff)
downloadllvm-97a03eb2eb5acf269db6253fe540626b52950f97.tar.gz
[libc] Fix sched_get_priority_max() syscall invocation
Previously used SYS_sched_get_priority_min. This also updates the tests for SCHED_RR and SCHED_FIFO to check max_priority > min_priority, rather than >= in order to catch future breakages. Reviewed By: michaelrj, goldstein.w.n Differential Revision: https://reviews.llvm.org/D149102
Diffstat (limited to 'libc/src')
-rw-r--r--libc/src/sched/linux/sched_get_priority_max.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/src/sched/linux/sched_get_priority_max.cpp b/libc/src/sched/linux/sched_get_priority_max.cpp
index 87d52f43c915..859c9755c783 100644
--- a/libc/src/sched/linux/sched_get_priority_max.cpp
+++ b/libc/src/sched/linux/sched_get_priority_max.cpp
@@ -17,7 +17,7 @@
namespace __llvm_libc {
LLVM_LIBC_FUNCTION(int, sched_get_priority_max, (int policy)) {
- long ret = __llvm_libc::syscall_impl(SYS_sched_get_priority_min, policy);
+ long ret = __llvm_libc::syscall_impl(SYS_sched_get_priority_max, policy);
if (ret < 0) {
libc_errno = -ret;
return -1;