Module bits

Source
Expand description

Bit manipulation macros.

C header: include/linux/bits.h

Functionsยง

bit_u8
Computes 1 << n by performing a compile-time assertion that n is in bounds.
bit_u16
Computes 1 << n by performing a compile-time assertion that n is in bounds.
bit_u32
Computes 1 << n by performing a compile-time assertion that n is in bounds.
bit_u64
Computes 1 << n by performing a compile-time assertion that n is in bounds.
checked_bit_u8
Computes 1 << n if n is in bounds, i.e.: if n is smaller than the maximum number of bits supported by the type.
checked_bit_u16
Computes 1 << n if n is in bounds, i.e.: if n is smaller than the maximum number of bits supported by the type.
checked_bit_u32
Computes 1 << n if n is in bounds, i.e.: if n is smaller than the maximum number of bits supported by the type.
checked_bit_u64
Computes 1 << n if n is in bounds, i.e.: if n is smaller than the maximum number of bits supported by the type.
genmask_checked_u8
Creates a contiguous bitmask for the given range by validating the range at runtime.
genmask_checked_u16
Creates a contiguous bitmask for the given range by validating the range at runtime.
genmask_checked_u32
Creates a contiguous bitmask for the given range by validating the range at runtime.
genmask_checked_u64
Creates a contiguous bitmask for the given range by validating the range at runtime.
genmask_u8
Creates a compile-time contiguous bitmask for the given range by performing a compile-time assertion that the range is valid.
genmask_u16
Creates a compile-time contiguous bitmask for the given range by performing a compile-time assertion that the range is valid.
genmask_u32
Creates a compile-time contiguous bitmask for the given range by performing a compile-time assertion that the range is valid.
genmask_u64
Creates a compile-time contiguous bitmask for the given range by performing a compile-time assertion that the range is valid.