pub const fn pack_call_gate(seg: Selector, entry: usize, dpl: Privilege, param_cnt: u8, valid: bool) -> Descriptor {
    let mut res: Descriptor = 0x0;
    res = mask_assign(res, entry as u64, 0, 0, 16);
    res = mask_assign(res, seg as u64, 16, 0, 16);
    res = mask_assign(res, param_cnt as u64, 32, 0, 5);
    res = mask_assign(res, 0 as u64, 37, 0, 3);
    res = mask_assign(res, SEG_CALL_GATE32 as u64, 40, 0, 4);
    res = mask_assign(res, 0 as u64, 44, 0, 1);
    res = mask_assign(res, dpl as u64, 45, 0, 2);
    res = mask_assign(res, valid as u64, 47, 0, 1);
    res = mask_assign(res, entry as u64, 48, 16, 16);
    res
}
/// This function packs a call gate descirptor from given attributes.
/// - seg: the selector of target code segment
/// - entry: the offset of entrypoint in target code segment 
/// - dpl: the privilege needed to invoke this call gate
/// - param_cnt: the count of parameters
/// - valid: whether this call gate is enabled
/// 
/// For more information, see *Intel Developer Manual Vol. 3A 5-13*
This function packs a call gate descirptor from given attributes.

For more information, see *Intel Developer Manual Vol.
This function packs a call gate descirptor from given attributes . For more information see * Intel Developer Manual Vol .
pub const fn pack_call_gate(seg: Selector, entry: usize, dpl: Privilege, param_cnt: u8, valid: bool) -> Descriptor {
    let mut res: Descriptor = 0x0;
    res = mask_assign(res, entry as u64, 0, 0, 16);
    res = mask_assign(res, seg as u64, 16, 0, 16);
    res = mask_assign(res, param_cnt as u64, 32, 0, 5);
    res = mask_assign(res, 0 as u64, 37, 0, 3);
    res = mask_assign(res, SEG_CALL_GATE32 as u64, 40, 0, 4);
    res = mask_assign(res, 0 as u64, 44, 0, 1);
    res = mask_assign(res, dpl as u64, 45, 0, 2);
    res = mask_assign(res, valid as u64, 47, 0, 1);
    res = mask_assign(res, entry as u64, 48, 16, 16);
    res
}
pub const fn pack_call_gate ( seg : Selector , entry : usize , dpl : Privilege , param_cnt : u8 , valid : bool ) -> Descriptor { let mut res : Descriptor = 0x0 ; res = mask_assign ( res , entry as u64 , 0 , 0 , 16 ) ; res = mask_assign ( res , seg as u64 , 16 , 0 , 16 ) ; res = mask_assign ( res , param_cnt as u64 , 32 , 0 , 5 ) ; res = mask_assign ( res , 0 as u64 , 37 , 0 , 3 ) ; res = mask_assign ( res , SEG_CALL_GATE32 as u64 , 40 , 0 , 4 ) ; res = mask_assign ( res , 0 as u64 , 44 , 0 , 1 ) ; res = mask_assign ( res , dpl as u64 , 45 , 0 , 2 ) ; res = mask_assign ( res , valid as u64 , 47 , 0 , 1 ) ; res = mask_assign ( res , entry as u64 , 48 , 16 , 16 ) ; res }
This function packs a call gate descirptor from given attributes.
This function packs a call gate descirptor from given attributes .
seg
Selector
entry
usize
dpl
Privilege
param_cnt
u8
valid
bool