Skip to main content

sys_nanosleep

Function sys_nanosleep 

Source
pub fn sys_nanosleep(req_ptr: u64, rem_ptr: u64) -> Result<u64, SyscallError>
Expand description

SYS_NANOSLEEP: Sleep for a specified duration.

§Arguments

  • req_ptr - Pointer to timespec structure with requested sleep duration
  • rem_ptr - Optional pointer to timespec for remaining time (if interrupted)

§Returns

  • 0 on success
  • -EINTR if interrupted by a signal (remaining time written to rem_ptr)
  • -EINVAL if the requested time is invalid