@ -14,10 +14,7 @@ where
Storage : AsRef < [ u8 ] > + AsMut < [ u8 ] > ,
{
#[ inline ]
pub fn get_bit ( & self , index : usize ) -> bool {
debug_assert! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ;
let byte_index = index / 8 ;
let byte = self . storage . as_ref ( ) [ byte_index ] ;
fn extract_bit ( byte : u8 , index : usize ) -> bool {
let bit_index = if cfg! ( target_endian = "big" ) {
7 - ( index % 8 )
} else {
@ -27,10 +24,21 @@ where
byte & mask = = mask
}
#[ inline ]
pub fn set_bit( & mut self , index : usize , val : bool ) {
pub fn get_bit( & self , index : usize ) -> bool {
debug_assert! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ;
let byte_index = index / 8 ;
let byte = & mut self . storage . as_mut ( ) [ byte_index ] ;
let byte = self . storage . as_ref ( ) [ byte_index ] ;
Self ::extract_bit ( byte , index )
}
#[ inline ]
pub unsafe fn raw_get_bit ( this : * const Self , index : usize ) -> bool {
debug_assert! ( index / 8 < core ::mem ::size_of ::< Storage > ( ) ) ;
let byte_index = index / 8 ;
let byte = * ( core ::ptr ::addr_of ! ( ( * this ) . storage ) as * const u8 ) . offset ( byte_index as isize ) ;
Self ::extract_bit ( byte , index )
}
#[ inline ]
fn change_bit ( byte : u8 , index : usize , val : bool ) -> u8 {
let bit_index = if cfg! ( target_endian = "big" ) {
7 - ( index % 8 )
} else {
@ -38,12 +46,27 @@ where
} ;
let mask = 1 < < bit_index ;
if val {
* byte | = mask ;
byte | mask
} else {
* byte & = ! mask ;
byte & ! mask
}
}
#[ inline ]
pub fn set_bit ( & mut self , index : usize , val : bool ) {
debug_assert! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ;
let byte_index = index / 8 ;
let byte = & mut self . storage . as_mut ( ) [ byte_index ] ;
* byte = Self ::change_bit ( * byte , index , val ) ;
}
#[ inline ]
pub unsafe fn raw_set_bit ( this : * mut Self , index : usize , val : bool ) {
debug_assert! ( index / 8 < core ::mem ::size_of ::< Storage > ( ) ) ;
let byte_index = index / 8 ;
let byte =
( core ::ptr ::addr_of_mut ! ( ( * this ) . storage ) as * mut u8 ) . offset ( byte_index as isize ) ;
* byte = Self ::change_bit ( * byte , index , val ) ;
}
#[ inline ]
pub fn get ( & self , bit_offset : usize , bit_width : u8 ) -> u64 {
debug_assert! ( bit_width < = 64 ) ;
debug_assert! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ;
@ -62,6 +85,24 @@ where
val
}
#[ inline ]
pub unsafe fn raw_get ( this : * const Self , bit_offset : usize , bit_width : u8 ) -> u64 {
debug_assert! ( bit_width < = 64 ) ;
debug_assert! ( bit_offset / 8 < core ::mem ::size_of ::< Storage > ( ) ) ;
debug_assert! ( ( bit_offset + ( bit_width as usize ) ) / 8 < = core ::mem ::size_of ::< Storage > ( ) ) ;
let mut val = 0 ;
for i in 0 .. ( bit_width as usize ) {
if Self ::raw_get_bit ( this , i + bit_offset ) {
let index = if cfg! ( target_endian = "big" ) {
bit_width as usize - 1 - i
} else {
i
} ;
val | = 1 < < index ;
}
}
val
}
#[ inline ]
pub fn set ( & mut self , bit_offset : usize , bit_width : u8 , val : u64 ) {
debug_assert! ( bit_width < = 64 ) ;
debug_assert! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ;
@ -77,6 +118,22 @@ where
self . set_bit ( index + bit_offset , val_bit_is_set ) ;
}
}
#[ inline ]
pub unsafe fn raw_set ( this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ) {
debug_assert! ( bit_width < = 64 ) ;
debug_assert! ( bit_offset / 8 < core ::mem ::size_of ::< Storage > ( ) ) ;
debug_assert! ( ( bit_offset + ( bit_width as usize ) ) / 8 < = core ::mem ::size_of ::< Storage > ( ) ) ;
for i in 0 .. ( bit_width as usize ) {
let mask = 1 < < i ;
let val_bit_is_set = val & mask = = mask ;
let index = if cfg! ( target_endian = "big" ) {
bit_width as usize - 1 - i
} else {
i
} ;
Self ::raw_set_bit ( this , index + bit_offset , val_bit_is_set ) ;
}
}
}
#[ repr(C) ]
#[ derive(Default) ]
@ -176,6 +233,7 @@ pub const BPF_F_REPLACE: u32 = 4;
pub const BPF_F_BEFORE : u32 = 8 ;
pub const BPF_F_AFTER : u32 = 16 ;
pub const BPF_F_ID : u32 = 32 ;
pub const BPF_F_LINK : u32 = 8192 ;
pub const BPF_F_STRICT_ALIGNMENT : u32 = 1 ;
pub const BPF_F_ANY_ALIGNMENT : u32 = 2 ;
pub const BPF_F_TEST_RND_HI32 : u32 = 4 ;
@ -211,6 +269,9 @@ pub const TC_ACT_REDIRECT: u32 = 7;
pub const TC_ACT_TRAP : u32 = 8 ;
pub const TC_ACT_VALUE_MAX : u32 = 8 ;
pub const TC_ACT_EXT_VAL_MASK : u32 = 268435455 ;
pub const TC_ACT_JUMP : u32 = 268435456 ;
pub const TC_ACT_GOTO_CHAIN : u32 = 536870912 ;
pub const TC_ACT_EXT_OPCODE_MAX : u32 = 536870912 ;
pub const SOL_SOCKET : u32 = 1 ;
pub const SO_DEBUG : u32 = 1 ;
pub const SO_REUSEADDR : u32 = 2 ;
@ -434,6 +495,28 @@ impl bpf_insn {
}
}
#[ inline ]
pub unsafe fn dst_reg_raw ( this : * const Self ) -> __u8 {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 1 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
4 u8 ,
) as u8 )
}
}
#[ inline ]
pub unsafe fn set_dst_reg_raw ( this : * mut Self , val : __u8 ) {
unsafe {
let val : u8 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 1 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
4 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn src_reg ( & self ) -> __u8 {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 4 usize , 4 u8 ) as u8 ) }
}
@ -445,6 +528,28 @@ impl bpf_insn {
}
}
#[ inline ]
pub unsafe fn src_reg_raw ( this : * const Self ) -> __u8 {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 1 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
4 usize ,
4 u8 ,
) as u8 )
}
}
#[ inline ]
pub unsafe fn set_src_reg_raw ( this : * mut Self , val : __u8 ) {
unsafe {
let val : u8 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 1 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
4 usize ,
4 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn new_bitfield_1 ( dst_reg : __u8 , src_reg : __u8 ) -> __BindgenBitfieldUnit < [ u8 ; 1 usize ] > {
let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1 usize ] > = Default ::default ( ) ;
__bindgen_bitfield_unit . set ( 0 usize , 4 u8 , {
@ -1957,6 +2062,28 @@ impl bpf_prog_info {
}
}
#[ inline ]
pub unsafe fn gpl_compatible_raw ( this : * const Self ) -> __u32 {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 4 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_gpl_compatible_raw ( this : * mut Self , val : __u32 ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 4 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn new_bitfield_1 ( gpl_compatible : __u32 ) -> __BindgenBitfieldUnit < [ u8 ; 4 usize ] > {
let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 4 usize ] > = Default ::default ( ) ;
__bindgen_bitfield_unit . set ( 0 usize , 1 u8 , {
@ -2805,6 +2932,28 @@ impl per_cr_bits {
}
}
#[ inline ]
pub unsafe fn em_branching_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
32 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_em_branching_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
32 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn em_instruction_fetch ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 33 usize , 1 u8 ) as u32 ) }
}
@ -2816,6 +2965,28 @@ impl per_cr_bits {
}
}
#[ inline ]
pub unsafe fn em_instruction_fetch_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
33 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_em_instruction_fetch_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
33 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn em_storage_alteration ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 34 usize , 1 u8 ) as u32 ) }
}
@ -2827,6 +2998,28 @@ impl per_cr_bits {
}
}
#[ inline ]
pub unsafe fn em_storage_alteration_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
34 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_em_storage_alteration_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
34 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn em_gpr_alt_unused ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 35 usize , 1 u8 ) as u32 ) }
}
@ -2838,6 +3031,28 @@ impl per_cr_bits {
}
}
#[ inline ]
pub unsafe fn em_gpr_alt_unused_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
35 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_em_gpr_alt_unused_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
35 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn em_store_real_address ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 36 usize , 1 u8 ) as u32 ) }
}
@ -2849,6 +3064,28 @@ impl per_cr_bits {
}
}
#[ inline ]
pub unsafe fn em_store_real_address_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
36 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_em_store_real_address_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
36 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn branch_addr_ctl ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 40 usize , 1 u8 ) as u32 ) }
}
@ -2860,6 +3097,28 @@ impl per_cr_bits {
}
}
#[ inline ]
pub unsafe fn branch_addr_ctl_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
40 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_branch_addr_ctl_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
40 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn storage_alt_space_ctl ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 42 usize , 1 u8 ) as u32 ) }
}
@ -2871,6 +3130,28 @@ impl per_cr_bits {
}
}
#[ inline ]
pub unsafe fn storage_alt_space_ctl_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
42 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_storage_alt_space_ctl_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 8 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
42 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn new_bitfield_1 (
em_branching : ::aya_ebpf_cty ::c_uint ,
em_instruction_fetch : ::aya_ebpf_cty ::c_uint ,
@ -2945,6 +3226,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn perc_branching_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_perc_branching_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn perc_instruction_fetch ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 1 usize , 1 u8 ) as u32 ) }
}
@ -2956,6 +3259,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn perc_instruction_fetch_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
1 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_perc_instruction_fetch_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
1 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn perc_storage_alteration ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 2 usize , 1 u8 ) as u32 ) }
}
@ -2967,6 +3292,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn perc_storage_alteration_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
2 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_perc_storage_alteration_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
2 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn perc_gpr_alt_unused ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 3 usize , 1 u8 ) as u32 ) }
}
@ -2978,6 +3325,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn perc_gpr_alt_unused_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
3 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_perc_gpr_alt_unused_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
3 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn perc_store_real_address ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 4 usize , 1 u8 ) as u32 ) }
}
@ -2989,6 +3358,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn perc_store_real_address_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
4 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_perc_store_real_address_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
4 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn atmid_psw_bit_31 ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 8 usize , 1 u8 ) as u32 ) }
}
@ -3000,6 +3391,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn atmid_psw_bit_31_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
8 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_atmid_psw_bit_31_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
8 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn atmid_validity_bit ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 9 usize , 1 u8 ) as u32 ) }
}
@ -3011,6 +3424,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn atmid_validity_bit_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
9 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_atmid_validity_bit_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
9 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn atmid_psw_bit_32 ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 10 usize , 1 u8 ) as u32 ) }
}
@ -3022,6 +3457,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn atmid_psw_bit_32_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
10 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_atmid_psw_bit_32_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
10 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn atmid_psw_bit_5 ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 11 usize , 1 u8 ) as u32 ) }
}
@ -3033,6 +3490,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn atmid_psw_bit_5_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
11 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_atmid_psw_bit_5_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
11 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn atmid_psw_bit_16 ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 12 usize , 1 u8 ) as u32 ) }
}
@ -3044,6 +3523,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn atmid_psw_bit_16_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
12 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_atmid_psw_bit_16_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
12 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn atmid_psw_bit_17 ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 13 usize , 1 u8 ) as u32 ) }
}
@ -3055,6 +3556,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn atmid_psw_bit_17_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
13 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_atmid_psw_bit_17_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
13 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn si ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 14 usize , 2 u8 ) as u32 ) }
}
@ -3066,6 +3589,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn si_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
14 usize ,
2 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_si_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 2 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
14 usize ,
2 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn new_bitfield_1 (
perc_branching : ::aya_ebpf_cty ::c_uint ,
perc_instruction_fetch : ::aya_ebpf_cty ::c_uint ,
@ -3146,6 +3691,28 @@ impl per_lowcore_bits {
}
}
#[ inline ]
pub unsafe fn access_id_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 1 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_2 ) ,
4 usize ,
4 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_access_id_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 1 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_2 ) ,
4 usize ,
4 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn new_bitfield_2 (
access_id : ::aya_ebpf_cty ::c_uint ,
) -> __BindgenBitfieldUnit < [ u8 ; 1 usize ] > {
@ -3192,6 +3759,28 @@ impl per_struct {
}
}
#[ inline ]
pub unsafe fn single_step_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 4 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_single_step_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 4 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
0 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn instruction_fetch ( & self ) -> ::aya_ebpf_cty ::c_uint {
unsafe { ::core ::mem ::transmute ( self . _bitfield_1 . get ( 1 usize , 1 u8 ) as u32 ) }
}
@ -3203,6 +3792,28 @@ impl per_struct {
}
}
#[ inline ]
pub unsafe fn instruction_fetch_raw ( this : * const Self ) -> ::aya_ebpf_cty ::c_uint {
unsafe {
::core ::mem ::transmute ( < __BindgenBitfieldUnit < [ u8 ; 4 usize ] > > ::raw_get (
::core ::ptr ::addr_of ! ( ( * this ) . _bitfield_1 ) ,
1 usize ,
1 u8 ,
) as u32 )
}
}
#[ inline ]
pub unsafe fn set_instruction_fetch_raw ( this : * mut Self , val : ::aya_ebpf_cty ::c_uint ) {
unsafe {
let val : u32 = ::core ::mem ::transmute ( val ) ;
< __BindgenBitfieldUnit < [ u8 ; 4 usize ] > > ::raw_set (
::core ::ptr ::addr_of_mut ! ( ( * this ) . _bitfield_1 ) ,
1 usize ,
1 u8 ,
val as u64 ,
)
}
}
#[ inline ]
pub fn new_bitfield_1 (
single_step : ::aya_ebpf_cty ::c_uint ,
instruction_fetch : ::aya_ebpf_cty ::c_uint ,