Commit graph

2 commits

Author SHA1 Message Date
Daniel Leung
5f20e31b5b lib/os: bitarray: introduce SYS_BITARRAY_DEFINE_STATIC()
This allows to declare a static bitarray struct that is local
to the source file.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-24 14:22:23 -05:00
Daniel Leung
ff407fb922 sys: introduce bit arrays
This introduces bit arrays as a new data type. This is different
than sys_bitfield as it is working on raw arrays of 32-bit
data. The bit arrays encode additional data inside the struct
to avoid going beyond the declared number of bits, and also
provides locking.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-07 13:36:22 -04:00