pub struct Cr0;
Expand description
Various control flags modifying the basic operation of the CPU.
Implementations§
source§impl Cr0
impl Cr0
sourcepub fn read() -> Cr0Flags
Available on crate feature instructions
only.
pub fn read() -> Cr0Flags
instructions
only.Read the current set of CR0 flags.
sourcepub fn read_raw() -> u64
Available on crate feature instructions
only.
pub fn read_raw() -> u64
instructions
only.Read the current raw CR0 value.
sourcepub unsafe fn write(flags: Cr0Flags)
Available on crate feature instructions
only.
pub unsafe fn write(flags: Cr0Flags)
instructions
only.Write CR0 flags.
Preserves the value of reserved fields.
§Safety
This function is unsafe because it’s possible to violate memory safety through it, e.g. by disabling paging.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cr0
impl RefUnwindSafe for Cr0
impl Send for Cr0
impl Sync for Cr0
impl Unpin for Cr0
impl UnwindSafe for Cr0
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more