Struct kernel_hal::vdso::VdsoConstants[][src]

#[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,
}

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

impl VdsoConstants[src]

pub fn set_version_string(&mut self, s: &str)[src]

Set version string.

Trait Implementations

impl Debug for VdsoConstants[src]

Auto Trait Implementations

impl RefUnwindSafe for VdsoConstants

impl Send for VdsoConstants

impl Sync for VdsoConstants

impl Unpin for VdsoConstants

impl UnwindSafe for VdsoConstants

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.