authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-31 03:25:08+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-31 03:31:58+02:00
log68bb788df57d6725c783adb2b9018cc7db789dd8
treeb8f5aece5b1b956c42657beac773a3c627da6e79
parent6364995d3f40efa96bec905c43182e3d4bbaea08
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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.

1 files changed, 3 insertions(+), 1 deletions(-)

lib/std/os/linux.zig+3-1
......@@ -1465,7 +1465,9 @@ pub fn settimeofday(tv: *const timeval, tz: *const timezone) usize {
14651465}
14661466
14671467pub fn nanosleep(req: *const timespec, rem: ?*timespec) usize {
1468 return syscall2(.nanosleep, @intFromPtr(req), @intFromPtr(rem));
1468 if (native_arch == .riscv32) {
1469 @compileError("No nanosleep syscall on this architecture.");
1470 } else return syscall2(.nanosleep, @intFromPtr(req), @intFromPtr(rem));
14691471}
14701472
14711473pub fn pause() usize {