template <uint32_t Bits, typename StorageType = uint64_t>

class Bitmask

Defined at line 31 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

TODO(johngro): Look into whether or not we can use std::bitset in the kernel,

and if we could efficiently use it here instead of rolling our own bitmask.

Right now, it might be a bit tough. Simple operations like setting and

clearing bits are built into bitset, but it does not support efficient

implementations of operations like "find the first bit set" as there is no

bitset specialization for stuff like `std::count[lr]_(zero|one)`, and the

opaque nature of the implementation of bitset makes it more or less

impossible for us to extend the class to support such a thing.

Public Methods

void Bitmask<Bits, StorageType> ()

Defined at line 33 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

void SetBit (uint32_t ndx)

Defined at line 35 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

void ClrBit (uint32_t ndx)

Defined at line 42 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

void AssignBit (uint32_t ndx, bool do_set)

Defined at line 49 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

bool TestBit (uint32_t ndx)

Defined at line 57 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

void SetLowestNBits (uint32_t N)

Defined at line 65 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

ktl::optional<uint32_t> FindFirstSetBit ()

Find the first (least significant) bit with a value of 1 in the bitmask and

return its index. Return nullopt if no such bit exists.

Defined at line 79 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h

ktl::optional<uint32_t> FindFirstClrBit ()

Find the first (least significant) bit with a value of 0 in the bitmask and

return its index. Return nullopt if no such bit exists.

Defined at line 90 of file ../../zircon/kernel/dev/iommu/arm_smmu/include/dev/arm_smmu/bitmask.h