#[repr(C)]
pub struct VdsoConstants { pub max_num_cpus: u32, pub features: Features, pub dcache_line_size: u32, pub icache_line_size: u32, pub ticks_per_second: u64, pub ticks_to_mono_numerator: u32, pub ticks_to_mono_denominator: u32, pub physmem: u64, pub version_string_len: u64, pub version_string: VersionString, }
Expand description

This struct contains constants that are initialized by the kernel once at boot time. From the vDSO code’s perspective, they are read-only data that can never change. Hence, no synchronization is required to read them.

Fields

max_num_cpus: u32

Maximum number of CPUs that might be online during the lifetime of the booted system.

features: Features

Bit map indicating features.

dcache_line_size: u32

Number of bytes in a data cache line.

icache_line_size: u32

Number of bytes in an instruction cache line.

ticks_per_second: u64

Conversion factor for zx_ticks_get return values to seconds.

ticks_to_mono_numerator: u32

Ratio which relates ticks (zx_ticks_get) to clock monotonic.

Specifically: ClockMono(ticks) = (ticks * N) / D

ticks_to_mono_denominator: u32physmem: u64

Total amount of physical memory in the system, in bytes.

version_string_len: u64

Actual length of version_string, not including the NUL terminator.

version_string: VersionString

A NUL-terminated UTF-8 string returned by zx_system_get_version_string.

Implementations

Set version string.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.

Casts the value.

Casts the value.

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.

Casts the value.

Casts the value.