sys_clock_nanosleep  [kernel/posix-timers.c]


Suspends execution of the currently running thread until specified time interval is elapsed, or until the function is woken up by a signal.

Arguments

eax 267
ebx Clock identifier. Currently supported values are:
CLOCK_REALTIME Systemwide realtime clock.
CLOCK_MONOTONIC Represents monotonic time. Cannot be set.
CLOCK_PROCESS_CPUTIME_ID High resolution per-process timer.
CLOCK_THREAD_CPUTIME_ID Thread-specific timer.
ecx Type of behavior the call will take. So far, the only value defined for this parameter is TIMER_ABSTIME. This value causes the current thread to be suspended from execution in three ways:
  1. Until either the time value of the clock specified by ebx reaches the absolute time specified by the timespec structure pointed by esi.
  2. Until a signal is delivered to the calling thread and its action is to invoke a signal-catching function.
  3. Until the process is terminated.
edx Pointer to a timespec structure specifying the time interval for waiting.
esi Pointer to a timespec structure which will be updated with the amount of time remaining in the time interval (requested minus sleep time). This argument may be 0.

Return values

If the system call succeeds the return value is 0.
If the system call fails the return value is one of the following errno values:

-EINVAL An invalid ebx value or an invalid esi was specified.
-EFAULT The value was could not be copied to the structure pointed by esi or an invalid edx value was specified.

Remarks

n/a

Compatibility

n/a