Skip to content

Commit 8439141

Browse files
committed
fix(sys/linux): wrong use of epoll_pwait syscall on arm64 & riscv64
1 parent 7e3e15a commit 8439141

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

core/sys/linux/sys.odin

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,18 +2477,8 @@ exit_group :: proc "contextless" (code: i32) -> ! {
24772477
Available since Linux 2.6.
24782478
*/
24792479
epoll_wait :: proc(epfd: Fd, events: [^]EPoll_Event, count: i32, timeout: i32) -> (i32, Errno) {
2480-
when ODIN_ARCH != .arm64 && ODIN_ARCH != .riscv64 {
2481-
ret := syscall(SYS_epoll_wait, epfd, events, count, timeout)
2482-
return errno_unwrap(ret, i32)
2483-
} else {
2484-
// Convert milliseconds to nanosecond timespec
2485-
timeout_ns := Time_Spec {
2486-
time_sec = uint(timeout * 1000),
2487-
time_nsec = 0,
2488-
}
2489-
ret := syscall(SYS_epoll_pwait, epfd, events, count, &timeout_ns, rawptr(nil))
2490-
return errno_unwrap(ret, i32)
2491-
}
2480+
ret := syscall(SYS_epoll_pwait, epfd, events, count, timeout, rawptr(nil))
2481+
return errno_unwrap(ret, i32)
24922482
}
24932483

24942484
/*

0 commit comments

Comments
 (0)