zig
zig copied to clipboard
std.os.linux is missing sched_setscheduler and related calls.
Zig Version
0.12.0-dev.3666+a2b834e8c
Steps to Reproduce and Observed Behavior
std.os.linux (and std.posix) is missing the realtime scheduling calls like sched_setscheduler.
Expected Behavior
I'm working on an application that may be improved by realtime scheduling, I can make the call by linking in libc, but should be able to do it with the Zig library.
It should be noted that the syscall values exist for this, and you could call it with std.os.linux.syscall3(.sched_setscheduler, ...)
without linking libc. But I agree that they are missing and probably should be added. Feel free to open a PR to add these helper functions, they should be pretty simple to add in.
Note: Final say is up to the core team of course :)