Home
last modified time | relevance | path

Searched refs:num_bits (Results 1 – 6 of 6) sorted by relevance

/Zephyr-Core-3.4.0/lib/os/
Dbitarray.c31 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()
222 __ASSERT_NO_MSG(bitarray->num_bits > 0); in sys_bitarray_set_bit()
224 if (bit >= bitarray->num_bits) { in sys_bitarray_set_bit()
248 __ASSERT_NO_MSG(bitarray->num_bits > 0); in sys_bitarray_clear_bit()
[all …]
/Zephyr-Core-3.4.0/include/zephyr/sys/
Dbitarray.h22 uint32_t num_bits; member
48 .num_bits = total_bits, \
154 int sys_bitarray_alloc(sys_bitarray_t *bitarray, size_t num_bits,
172 int sys_bitarray_free(sys_bitarray_t *bitarray, size_t num_bits,
188 bool sys_bitarray_is_region_set(sys_bitarray_t *bitarray, size_t num_bits,
204 bool sys_bitarray_is_region_cleared(sys_bitarray_t *bitarray, size_t num_bits,
221 int sys_bitarray_set_region(sys_bitarray_t *bitarray, size_t num_bits,
246 int sys_bitarray_test_and_set_region(sys_bitarray_t *bitarray, size_t num_bits,
263 int sys_bitarray_clear_region(sys_bitarray_t *bitarray, size_t num_bits,
Datomic.h93 #define ATOMIC_BITMAP_SIZE(num_bits) (1 + ((num_bits) - 1) / ATOMIC_BITS) argument
114 #define ATOMIC_DEFINE(name, num_bits) \ argument
115 atomic_t name[ATOMIC_BITMAP_SIZE(num_bits)]
/Zephyr-Core-3.4.0/tests/kernel/common/src/
Dbitarray.c52 void validate_bitarray_define(sys_bitarray_t *ba, size_t num_bits) in validate_bitarray_define() argument
57 num_bundles = ROUND_UP(ROUND_UP(num_bits, 8) / 8, sizeof(uint32_t)) in validate_bitarray_define()
60 zassert_equal(ba->num_bits, num_bits, in validate_bitarray_define()
62 num_bits, ba->num_bits); in validate_bitarray_define()
71 i, num_bits); in validate_bitarray_define()
140 for (bit = 0U; bit < ba.num_bits; ++bit) { in ZTEST()
224 ret = sys_bitarray_set_bit(&ba, ba.num_bits); in ZTEST()
229 ret = sys_bitarray_clear_bit(&ba, ba.num_bits); in ZTEST()
234 ret = sys_bitarray_test_bit(&ba, ba.num_bits, &bit_val); in ZTEST()
239 ret = sys_bitarray_test_and_set_bit(&ba, ba.num_bits, &bit_val); in ZTEST()
[all …]
/Zephyr-Core-3.4.0/kernel/
Dmmu.c206 size_t offset, num_bits; in virt_region_init() local
215 num_bits = Z_VM_RESERVED / CONFIG_MMU_PAGE_SIZE; in virt_region_init()
217 num_bits, 0); in virt_region_init()
221 num_bits = POINTER_TO_UINT(Z_FREE_VM_START) in virt_region_init()
223 offset = virt_to_bitmap_offset(Z_VIRT_RAM_START, num_bits); in virt_region_init()
224 num_bits /= CONFIG_MMU_PAGE_SIZE; in virt_region_init()
226 num_bits, offset); in virt_region_init()
233 size_t offset, num_bits; in virt_region_free() local
251 num_bits = size / CONFIG_MMU_PAGE_SIZE; in virt_region_free()
252 (void)sys_bitarray_free(&virt_region_bitmap, num_bits, offset); in virt_region_free()
[all …]
/Zephyr-Core-3.4.0/arch/xtensa/core/
Dxtensa-asm2.c179 static inline unsigned int get_bits(int offset, int num_bits, unsigned int val) in get_bits() argument
183 mask = BIT(num_bits) - 1; in get_bits()