managarm/hel
Loading...
Searching...
No Matches
Public Attributes | List of all members
HelClockPage Struct Reference

Parameters that allow userspace to compute the current time on the monotone clock (i.e., the clock read by helGetClock()) without performing syscalls. More...

#include <hel.h>

Public Attributes

uint32_t clockType
 One of the kHelClock* constants.
 
int32_t tickShift
 Scaling exponent of the tick -> nanosecond conversion.
 
uint64_t tickFactor
 Factor of the tick -> nanosecond conversion.
 

Detailed Description

Parameters that allow userspace to compute the current time on the monotone clock (i.e., the clock read by helGetClock()) without performing syscalls.

Obtained as a read-only memory object via helObtainHandle() with kHelObtainClockPage. All fields are protected by a seqlock: readers repeat the read while seqlock is odd or while it changes during the read.

The conversion from clock ticks to nanoseconds is (tickFactor * ticks) >> tickShift. The multiplication is performed in 128-bit arithmetic.


The documentation for this struct was generated from the following file: