[libc-commits] [PATCH] D148069: [LIBC] Implement remainder of posix 'sched.h' minus `SCHED_SPORADIC`
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Apr 13 21:38:34 PDT 2023
sivachandra added inline comments.
================
Comment at: libc/include/llvm-libc-macros/sched-macros.h:13
+// These defines are req by posix, These values are from linux/sched.h:
+// https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/sched.h
+#define SCHED_OTHER 0
----------------
sivachandra wrote:
> Ditto.
Remove these commented out lines - it will become a precedent for new patches otherwise.
================
Comment at: libc/test/src/sched/sched_rr_get_interval_test.cpp:38
+ // We can only set SCHED_RR with CAP_SYS_ADMIN
+ if (getuid() == 0)
+ SetSched(SCHED_RR);
----------------
michaelrj wrote:
> for clarity, this should be `::getuid` since it's coming from the system's libc.
LLVM's libc has `getuid` so why don't we just use `__llvm_libc::getuid` here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148069/new/
https://reviews.llvm.org/D148069
More information about the libc-commits
mailing list