pub fn enable_fsgsbase() {
    unsafe {
        let mut cr4: controlregs::Cr4 = controlregs::cr4();
        cr4 |= controlregs::Cr4::CR4_ENABLE_FSGSBASE;
        controlregs::cr4_write(cr4)
    };
}
/// For our scheduler and KCB we enable the fs/gs base instructions on the machine
/// This allows us to conventiently read and write the fs and gs registers
/// with 64 bit values (otherwise it's a bit of a pain)
/// (used for our thread local storage implementation).
///
/// # TODO
/// This is public because of the integration tests (and ideally shouldn't be).
For our scheduler and KCB we enable the fs/gs base instructions on the machine
This allows us to conventiently read and write the fs and gs registers
with 64 bit values (otherwise it's a bit of a pain)
(used for our thread local storage implementation).
For our scheduler and KCB we enable the fs / gs base instructions on the machine This allows us to conventiently read and write the fs and gs registers with 64 bit values ( otherwise it ' s a bit of a pain ) ( used for our thread local storage implementation ) .
pub fn enable_fsgsbase() {
    unsafe {
        let mut cr4: controlregs::Cr4 = controlregs::cr4();
        cr4 |= controlregs::Cr4::CR4_ENABLE_FSGSBASE;
        controlregs::cr4_write(cr4)
    };
}
pub fn enable_fsgsbase ( ) { unsafe { let mut cr4 : controlregs :: Cr4 = controlregs :: cr4 ( ) ; cr4 |= controlregs :: Cr4 :: CR4_ENABLE_FSGSBASE ; controlregs :: cr4_write ( cr4 ) } ; }
For our scheduler and KCB we enable the fs/gs base instructions on the machine
This allows us to conventiently read and write the fs and gs registers
with 64 bit values (otherwise it's a bit of a pain)
(used for our thread local storage implementation).
For our scheduler and KCB we enable the fs / gs base instructions on the machine This allows us to conventiently read and write the fs and gs registers with 64 bit values ( otherwise it ' s a bit of a pain ) ( used for our thread local storage implementation ) .
todo
This is public because of the integration tests (and ideally shouldn't be).
This is public because of the integration tests ( and ideally shouldn ' t be ) .