mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 02:10:06 +00:00
core:sys/linux - flags, spacing, inotify_init
This commit is contained in:
@@ -2537,8 +2537,13 @@ waitid :: proc "contextless" (id_type: Id_Type, id: Id, sig_info: ^Sig_Info, opt
|
||||
// TODO(flysand): ioprio_get
|
||||
|
||||
inotify_init :: proc "contextless" () -> (Fd, Errno) {
|
||||
ret := syscall(SYS_inotify_init)
|
||||
return errno_unwrap(ret, Fd)
|
||||
when ODIN_ARCH == .arm64 || ODIN_ARCH == .riscv64 {
|
||||
ret := syscall(SYS_inotify_init1, 0)
|
||||
return errno_unwrap(ret, Fd)
|
||||
} else {
|
||||
ret := syscall(SYS_inotify_init)
|
||||
return errno_unwrap(ret, Fd)
|
||||
}
|
||||
}
|
||||
|
||||
inotify_init1 :: proc "contextless" (flags: Inotify_Init_Flags) -> (Fd, Errno) {
|
||||
@@ -2556,12 +2561,6 @@ inotify_rm_watch :: proc "contextless" (fd: Fd, wd: Wd) -> (Errno) {
|
||||
return Errno(-ret)
|
||||
}
|
||||
|
||||
// helper procedure to access the data within an `Inotify_Event`
|
||||
// since Odin doesn't have an alternative to `__flexarr`
|
||||
inotify_event_name :: proc "contextless" (event: ^Inotify_Event) -> cstring {
|
||||
return transmute(cstring)uintptr(&event.name)
|
||||
}
|
||||
|
||||
// TODO(flysand): migrate_pages
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user