Module time

Module time 

Source
Expand description

Time-related system calls for Linux ABI on RISC-V 64

This module implements Linux time system calls for the Scarlet kernel, providing compatibility with Linux userspace programs that need time information.

Structsยง

ItimerSpec ๐Ÿ”’
Linux itimerspec structure used by timer_settime/gettime.
PosixTimer
Public representation of a POSIX timer stored in the Linux ABI state.
PosixTimerHandler ๐Ÿ”’
PosixTimerShared
Linux POSIX timer shared state guarded by a spin mutex for interior mutability.
PosixTimerState
Mutable state stored for each POSIX timer.
TimeSpec
Linux timespec structure (matches Linux userspace)

Constantsยง

CLOCK_BOOTTIME
CLOCK_MONOTONIC
CLOCK_MONOTONIC_COARSE
CLOCK_MONOTONIC_RAW
CLOCK_PROCESS_CPUTIME_ID
CLOCK_REALTIME
Linux clock IDs (subset of commonly used ones)
CLOCK_REALTIME_COARSE
CLOCK_THREAD_CPUTIME_ID
NSEC_PER_SEC_I64 ๐Ÿ”’
NSEC_PER_SEC_U64 ๐Ÿ”’
SIGEV_NONE
SIGEV_SIGNAL
Linux sigevent notification values (subset).
SIGEV_THREAD
SIGEV_THREAD_ID
TIMER_ABSTIME ๐Ÿ”’

Functionsยง

is_supported_clock ๐Ÿ”’
ns_to_timespec ๐Ÿ”’
sys_clock_getres
Linux sys_clock_getres implementation (stub)
sys_clock_gettime
sys_clock_gettime - Get time from specified clock
sys_nanosleep
sys_nanosleep - Sleep for the specified time (Linux ABI)
sys_timer_create
Linux timer_create implementation.
sys_timer_delete
Linux timer_delete implementation.
sys_timer_getoverrun
Linux timer_getoverrun implementation (simple stub returning 0).
sys_timer_gettime
Linux timer_gettime implementation.
sys_timer_settime
Linux timer_settime implementation.
timespec_to_ns ๐Ÿ”’