basic/bitfield: add bitfield operations
authorDan Streetman <ddstreet@ieee.org>
Thu, 2 Feb 2023 20:58:10 +0000 (15:58 -0500)
committerDan Streetman <ddstreet@ieee.org>
Thu, 9 Mar 2023 14:58:32 +0000 (09:58 -0500)
commit33d9beed07b3dab05d07d57e8af13bb19b9e3095
tree868370b9f816c2024fc791b0ad9f78300ac0391c
parent326ef267004bf8362cf0b0066af8ce56e0e2941e
basic/bitfield: add bitfield operations

Add macros to manage bits in a bitfield (e.g. uint32_t, uint64_t, etc),
such as setting, clearing, checking bits, and iterating all set bits.

These are similiar to the bitmap operations, but operate on basic types
instead of requiring a Bitmap object.
src/basic/bitfield.h [new file with mode: 0644]