pub fn update(src: &'a DescriptorTable<LEN>) -> Result<(), DTError> {
        if src.cur == 0 {
           return Err(DTError::EmptyTable)
        }
        // this is enforced by intel
        if src.table[0] != 0 {
            return Err(DTError::ErrorReservedEntry)
        }

        let desc = Self {
            limit: src.cur as u16 * 8 - 1,
            base_address: src.table
        };
        
        unsafe {
            asm!("lgdt [{:e}]", in(reg) &desc)
        }
        Ok(())
    }
/// Update the gdt descriptor and then update gdtr.
/// This function should be called in a task with CPL of ring 0.
Update the gdt descriptor and then update gdtr.
This function should be called in a task with CPL of ring 0.
Update the gdt descriptor and then update gdtr . This function should be called in a task with CPL of ring 0 .
pub fn update(src: &'a DescriptorTable<LEN>) -> Result<(), DTError> {
        if src.cur == 0 {
           return Err(DTError::EmptyTable)
        }
        // this is enforced by intel
        if src.table[0] != 0 {
            return Err(DTError::ErrorReservedEntry)
        }
        let desc = Self {
            limit: src.cur as u16 * 8 - 1,
            base_address: src.table
        };
        unsafe {
            asm!("lgdt [{:e}]", in(reg) &desc)
        }
        Ok(())
    }
pub fn update ( src : & ' a DescriptorTable < LEN > ) -> Result < ( ) , DTError > { if src . cur == 0 { return Err ( DTError :: EmptyTable ) } // this is enforced by intel if src . table [ 0 ] != 0 { return Err ( DTError :: ErrorReservedEntry ) } let desc = Self { limit : src . cur as u16 * 8 - 1 , base_address : src . table } ; unsafe { asm ! ( " " in ( reg ) desc ) } Ok ( ( ) ) }
Update the gdt descriptor and then update gdtr.
Update the gdt descriptor and then update gdtr .
src
&'a DescriptorTable<LEN>