Home
last modified time | relevance | path

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

/Zephyr-Core-2.7.6/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
77 setup_bundle_data(bitarray, bd, offset, num_bits); in match_region()
178 size_t num_bits, bool to_set, in set_region() argument
186 setup_bundle_data(bitarray, bd, offset, num_bits); in set_region()
226 __ASSERT_NO_MSG(bitarray->num_bits > 0); in sys_bitarray_set_bit()
228 if (bit >= bitarray->num_bits) { in sys_bitarray_set_bit()
253 __ASSERT_NO_MSG(bitarray->num_bits > 0); in sys_bitarray_clear_bit()
[all …]
/Zephyr-Core-2.7.6/include/sys/
Dbitarray.h21 uint32_t num_bits; member
48 .num_bits = total_bits, \
137 int sys_bitarray_alloc(sys_bitarray_t *bitarray, size_t num_bits,
155 int sys_bitarray_free(sys_bitarray_t *bitarray, size_t num_bits,
171 bool sys_bitarray_is_region_set(sys_bitarray_t *bitarray, size_t num_bits,
187 bool sys_bitarray_is_region_cleared(sys_bitarray_t *bitarray, size_t num_bits,
204 int sys_bitarray_set_region(sys_bitarray_t *bitarray, size_t num_bits,
221 int sys_bitarray_clear_region(sys_bitarray_t *bitarray, size_t num_bits,
Datomic.h92 #define ATOMIC_BITMAP_SIZE(num_bits) (1 + ((num_bits) - 1) / ATOMIC_BITS) argument
113 #define ATOMIC_DEFINE(name, num_bits) \ argument
114 atomic_t name[ATOMIC_BITMAP_SIZE(num_bits)]
/Zephyr-Core-2.7.6/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 test_bitarray_set_clear()
224 ret = sys_bitarray_set_bit(&ba, ba.num_bits); in test_bitarray_set_clear()
229 ret = sys_bitarray_clear_bit(&ba, ba.num_bits); in test_bitarray_set_clear()
234 ret = sys_bitarray_test_bit(&ba, ba.num_bits, &bit_val); in test_bitarray_set_clear()
239 ret = sys_bitarray_test_and_set_bit(&ba, ba.num_bits, &bit_val); in test_bitarray_set_clear()
[all …]
/Zephyr-Core-2.7.6/kernel/
Dmmu.c204 size_t offset, num_bits; in virt_region_init() local
213 num_bits = Z_VM_RESERVED / CONFIG_MMU_PAGE_SIZE; in virt_region_init()
215 num_bits, 0); in virt_region_init()
219 num_bits = POINTER_TO_UINT(Z_FREE_VM_START) in virt_region_init()
221 offset = virt_to_bitmap_offset(Z_VIRT_RAM_START, num_bits); in virt_region_init()
222 num_bits /= CONFIG_MMU_PAGE_SIZE; in virt_region_init()
224 num_bits, offset); in virt_region_init()
233 size_t num_bits; in virt_region_alloc() local
240 num_bits = size / CONFIG_MMU_PAGE_SIZE; in virt_region_alloc()
241 ret = sys_bitarray_alloc(&virt_region_bitmap, num_bits, &offset); in virt_region_alloc()
[all …]
/Zephyr-Core-2.7.6/arch/xtensa/core/
Dxtensa-asm2.c130 static inline unsigned int get_bits(int offset, int num_bits, unsigned int val) in get_bits() argument
134 mask = BIT(num_bits) - 1; in get_bits()