Namespaces

Records

Functions

  • zx_instant_mono_ticks_t compute_monotonic_ticks (zx_vaddr_t time_values_addr)

    Defined at line 15 of file ../../zircon/kernel/lib/fasttime/include/lib/fasttime/time.h

  • zx_instant_mono_t compute_monotonic_time (zx_vaddr_t time_values_addr)

    Defined at line 22 of file ../../zircon/kernel/lib/fasttime/include/lib/fasttime/time.h

  • zx_instant_boot_ticks_t compute_boot_ticks (zx_vaddr_t time_values_addr)

    Defined at line 29 of file ../../zircon/kernel/lib/fasttime/include/lib/fasttime/time.h

  • zx_instant_boot_t compute_boot_time (zx_vaddr_t time_values_addr)

    Defined at line 35 of file ../../zircon/kernel/lib/fasttime/include/lib/fasttime/time.h

Concepts

template <typename T> ClockTransformationAdapter requires (T) { { T::ArchYield() } -> std::same_as<void>; { T::GetMonoTicks() } -> std::same_as<zx_instant_mono_ticks_t>; { T::GetBootTicks() } -> std::same_as<zx_instant_boot_ticks_t>; }

ClockTransformation structures in `libfasttime` need an adapter class

injected into them in order to operate correctly in their environment. The

transformation structure will be used in either user mode (via the VDSO) or

in the kernel, and there will be a few differences in their behavior

depending on where they are executing.

Both environments need to make use of libconcurrent's implementation of a

SeqLock, however we will only need to use a subset of the SeqLock API as we

never need to wait with a timeout on the lock. As a result, we only need

to supply an implementation of ArchYield in order to use SeqLocks.

Actually reading or getting details for a clock requires access to either

the monotonic or boot ticks timeline, depending on how the clock is

configured. Depending on the environment, we need to be able to do this

one of three ways.

1) Using current_ticks/current_boot_ticks when operating in the Kernel.

2) Using libfasttime directly when operating in a VDSO and direct

observation of the underlying reference counter HW is permitted in

user-mode.

3) Using a syscall to fetch ticks when operating in a VDSO when directly

reading the underlying reference counter HW is not permitted.

Users will provide an implementation of GetMonoTicks and GetBootTicks which

is appropriate for their environment in order to provide the required

access to the timelines.

Defined at line 46 of file ../../zircon/kernel/lib/fasttime/include/lib/fasttime/clock.h