From 6f9401364f4a2163cb8442df224ddc89455807fb Mon Sep 17 00:00:00 2001 From: robinyuan1002 Date: Wed, 2 Oct 2024 13:41:55 -0400 Subject: [PATCH] add comment for nanosleep_time64 syscall --- src/safeposix/syscalls/fs_calls.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/safeposix/syscalls/fs_calls.rs b/src/safeposix/syscalls/fs_calls.rs index 36fe10a..12fd70e 100644 --- a/src/safeposix/syscalls/fs_calls.rs +++ b/src/safeposix/syscalls/fs_calls.rs @@ -1889,6 +1889,8 @@ impl Cage { unsafe { syscall(SYS_futex, uaddr, futex_op, val, val2, uaddr2, val3) as i32 } } + //We directly call nanosleep syscall(SYS_clock_nanosleep) from the libc + //return an `i32` value representing the result of the system call. pub fn nanosleep_time64_syscall(&self, clockid: u32, flags: i32, req: usize, rem: usize) -> i32 { unsafe { syscall(SYS_clock_nanosleep, clockid, flags, req, rem) as i32 } }