From 0036509f74592e6921e0dbb994e0df02e6d673ba Mon Sep 17 00:00:00 2001 From: Rickard Andersson Date: Wed, 14 Jun 2023 23:51:33 +0300 Subject: [PATCH] cleanup(os_linux/poll): use tabs everywhere :( --- core/sys/unix/syscalls_linux.odin | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/core/sys/unix/syscalls_linux.odin b/core/sys/unix/syscalls_linux.odin index 0accc9d53..fdfc27187 100644 --- a/core/sys/unix/syscalls_linux.odin +++ b/core/sys/unix/syscalls_linux.odin @@ -2075,22 +2075,21 @@ sys_fcntl :: proc "contextless" (fd: int, cmd: int, arg: int) -> int { } sys_poll :: proc "contextless" (fds: rawptr, nfds: uint, timeout: int) -> int { - // NOTE: specialcased here because `arm64` does not have `poll` + // NOTE: specialcased here because `arm64` does not have `poll` when ODIN_ARCH == .arm64 { - // redefined because we can't depend on the `unix` module here - timespec :: struct { - tv_sec: i64, - tv_nsec: i64, - } - seconds := i64(timeout / 1_000) - nanoseconds := i64((timeout % 1000) * 1_000_000) - timeout_spec := timespec{seconds, nanoseconds} - + // redefined because we can't depend on the `unix` module here + timespec :: struct { + tv_sec: i64, + tv_nsec: i64, + } + seconds := i64(timeout / 1_000) + nanoseconds := i64((timeout % 1000) * 1_000_000) + timeout_spec := timespec{seconds, nanoseconds} + return int(intrinsics.syscall(SYS_ppoll, uintptr(fds), uintptr(nfds), uintptr(&timeout_spec), uintptr(0), uintptr(8))) } else { - return int(intrinsics.syscall(SYS_poll, uintptr(fds), uintptr(nfds), uintptr(timeout))) + return int(intrinsics.syscall(SYS_poll, uintptr(fds), uintptr(nfds), uintptr(timeout))) } - } sys_ppoll :: proc "contextless" (fds: rawptr, nfds: uint, timeout: rawptr, sigmask: rawptr, sigsetsize: uint) -> int {