mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
std.os.linux: Make nanosleep() a compile error on riscv32.
This should eventually be converted to the void/{} pattern along with the other
syscalls that are compile errors for riscv32.
This commit is contained in:
parent
6364995d3f
commit
68bb788df5
@ -1465,7 +1465,9 @@ pub fn settimeofday(tv: *const timeval, tz: *const timezone) usize {
|
||||
}
|
||||
|
||||
pub fn nanosleep(req: *const timespec, rem: ?*timespec) usize {
|
||||
return syscall2(.nanosleep, @intFromPtr(req), @intFromPtr(rem));
|
||||
if (native_arch == .riscv32) {
|
||||
@compileError("No nanosleep syscall on this architecture.");
|
||||
} else return syscall2(.nanosleep, @intFromPtr(req), @intFromPtr(rem));
|
||||
}
|
||||
|
||||
pub fn pause() usize {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user