[libc-commits] [PATCH] D149102: [libc] Fix sched_get_priority_max() syscall invocation

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Apr 25 16:18:05 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG97a03eb2eb5a: [libc] Fix sched_get_priority_max() syscall invocation (authored by tzussman, committed by michaelrj).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149102/new/

https://reviews.llvm.org/D149102

Files:
  libc/src/sched/linux/sched_get_priority_max.cpp
  libc/test/src/sched/get_priority_test.cpp


Index: libc/test/src/sched/get_priority_test.cpp
===================================================================
--- libc/test/src/sched/get_priority_test.cpp
+++ libc/test/src/sched/get_priority_test.cpp
@@ -89,7 +89,7 @@
 
     ASSERT_LE(max_priority, 99);
     ASSERT_GE(min_priority, 0);
-    ASSERT_GE(max_priority, min_priority);
+    ASSERT_GT(max_priority, min_priority);
   }
 
   {
@@ -103,6 +103,6 @@
 
     ASSERT_LE(max_priority, 99);
     ASSERT_GE(min_priority, 0);
-    ASSERT_GE(max_priority, min_priority);
+    ASSERT_GT(max_priority, min_priority);
   }
 }
Index: libc/src/sched/linux/sched_get_priority_max.cpp
===================================================================
--- libc/src/sched/linux/sched_get_priority_max.cpp
+++ 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149102.516974.patch
Type: text/x-patch
Size: 1130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230425/5d1db95a/attachment.bin>


More information about the libc-commits mailing list