/Zephyr-latest/lib/utils/ |
D | bitarray.c | 31 size_t offset, size_t num_bits) in setup_bundle_data() argument 36 bd->eidx = (offset + num_bits - 1) / bundle_bitness(bitarray); in setup_bundle_data() 37 bd->eoff = (offset + num_bits - 1) % bundle_bitness(bitarray); in setup_bundle_data() 66 size_t num_bits, bool match_set, in match_region() argument 76 setup_bundle_data(bitarray, bd, offset, num_bits); in match_region() 173 size_t num_bits, bool to_set, in set_region() argument 181 setup_bundle_data(bitarray, bd, offset, num_bits); in set_region() 213 int sys_bitarray_popcount_region(sys_bitarray_t *bitarray, size_t num_bits, size_t offset, in sys_bitarray_popcount_region() argument 222 __ASSERT_NO_MSG(bitarray->num_bits > 0); in sys_bitarray_popcount_region() 226 if (num_bits == 0 || offset + num_bits > bitarray->num_bits) { in sys_bitarray_popcount_region() [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | bitarray.h | 34 uint32_t num_bits; member 62 .num_bits = (total_bits), \ 168 int sys_bitarray_alloc(sys_bitarray_t *bitarray, size_t num_bits, 185 int sys_bitarray_xor(sys_bitarray_t *dst, sys_bitarray_t *other, size_t num_bits, size_t offset); 206 int sys_bitarray_find_nth_set(sys_bitarray_t *bitarray, size_t n, size_t num_bits, size_t offset, 223 int sys_bitarray_popcount_region(sys_bitarray_t *bitarray, size_t num_bits, size_t offset, 241 int sys_bitarray_free(sys_bitarray_t *bitarray, size_t num_bits, 257 bool sys_bitarray_is_region_set(sys_bitarray_t *bitarray, size_t num_bits, 273 bool sys_bitarray_is_region_cleared(sys_bitarray_t *bitarray, size_t num_bits, 290 int sys_bitarray_set_region(sys_bitarray_t *bitarray, size_t num_bits, [all …]
|
D | atomic.h | 90 #define ATOMIC_BITMAP_SIZE(num_bits) (ROUND_UP(num_bits, ATOMIC_BITS) / ATOMIC_BITS) argument 111 #define ATOMIC_DEFINE(name, num_bits) \ argument 112 atomic_t name[ATOMIC_BITMAP_SIZE(num_bits)]
|
/Zephyr-latest/subsys/bluetooth/controller/util/ |
D | util.c | 324 uint32_t util_get_bits(uint8_t *data, uint8_t bit_offs, uint8_t num_bits) in util_get_bits() argument 333 while (num_bits) { in util_get_bits() 334 bits = MIN(num_bits, 8 - bit_offs); in util_get_bits() 337 num_bits -= bits; in util_get_bits() 352 void util_set_bits(uint8_t *data, uint8_t bit_offs, uint8_t num_bits, in util_set_bits() argument 359 while (num_bits) { in util_set_bits() 360 bits = MIN(num_bits, 8 - bit_offs); in util_set_bits() 364 num_bits -= bits; in util_set_bits()
|
D | util.h | 20 uint32_t util_get_bits(uint8_t *data, uint8_t bit_offs, uint8_t num_bits); 21 void util_set_bits(uint8_t *data, uint8_t bit_offs, uint8_t num_bits,
|
/Zephyr-latest/tests/kernel/common/src/ |
D | bitarray.c | 53 void validate_bitarray_define(sys_bitarray_t *ba, size_t num_bits) in validate_bitarray_define() argument 58 num_bundles = ROUND_UP(ROUND_UP(num_bits, 8) / 8, sizeof(uint32_t)) in validate_bitarray_define() 61 zassert_equal(ba->num_bits, num_bits, in validate_bitarray_define() 63 num_bits, ba->num_bits); in validate_bitarray_define() 72 i, num_bits); in validate_bitarray_define() 141 for (bit = 0U; bit < ba.num_bits; ++bit) { in ZTEST() 225 ret = sys_bitarray_set_bit(&ba, ba.num_bits); in ZTEST() 230 ret = sys_bitarray_clear_bit(&ba, ba.num_bits); in ZTEST() 235 ret = sys_bitarray_test_bit(&ba, ba.num_bits, &bit_val); in ZTEST() 240 ret = sys_bitarray_test_and_set_bit(&ba, ba.num_bits, &bit_val); in ZTEST() [all …]
|
/Zephyr-latest/kernel/ |
D | mmu.c | 215 size_t offset, num_bits; in virt_region_init() local 224 num_bits = K_MEM_VM_RESERVED / CONFIG_MMU_PAGE_SIZE; in virt_region_init() 226 num_bits, 0); in virt_region_init() 230 num_bits = POINTER_TO_UINT(K_MEM_VM_FREE_START) in virt_region_init() 232 offset = virt_to_bitmap_offset(K_MEM_VIRT_RAM_START, num_bits); in virt_region_init() 233 num_bits /= CONFIG_MMU_PAGE_SIZE; in virt_region_init() 235 num_bits, offset); in virt_region_init() 242 size_t offset, num_bits; in virt_region_free() local 264 num_bits = size / CONFIG_MMU_PAGE_SIZE; in virt_region_free() 265 (void)sys_bitarray_free(&virt_region_bitmap, num_bits, offset); in virt_region_free() [all …]
|
/Zephyr-latest/arch/xtensa/core/ |
D | vector_handlers.c | 211 static inline unsigned int get_bits(int offset, int num_bits, unsigned int val) in get_bits() argument 215 mask = BIT(num_bits) - 1; in get_bits()
|
/Zephyr-latest/drivers/counter/ |
D | counter_nxp_mrt.c | 338 GENMASK(DT_INST_PROP(n, num_bits) - 1, 0), \
|