Lines Matching refs:bit
48 size_t bit; in get_posix_spinlock() local
56 bit = to_posix_spinlock_idx(*lock); in get_posix_spinlock()
62 if (sys_bitarray_test_bit(&posix_spinlock_bitarray, bit, &actually_initialized) < 0) { in get_posix_spinlock()
71 return (struct k_spinlock *)&posix_spinlock_pool[bit]; in get_posix_spinlock()
77 size_t bit; in pthread_spin_init() local
85 ret = sys_bitarray_alloc(&posix_spinlock_bitarray, 1, &bit); in pthread_spin_init()
90 *lock = mark_pthread_obj_initialized(bit); in pthread_spin_init()
98 size_t bit; in pthread_spin_destroy() local
107 bit = posix_spinlock_to_offset(l); in pthread_spin_destroy()
108 err = sys_bitarray_free(&posix_spinlock_bitarray, 1, bit); in pthread_spin_destroy()
116 size_t bit; in pthread_spin_lock() local
125 bit = posix_spinlock_to_offset(l); in pthread_spin_lock()
126 posix_spinlock_key[bit] = k_spin_lock(l); in pthread_spin_lock()
133 size_t bit; in pthread_spin_trylock() local
142 bit = posix_spinlock_to_offset(l); in pthread_spin_trylock()
143 return k_spin_trylock(l, &posix_spinlock_key[bit]); in pthread_spin_trylock()
148 size_t bit; in pthread_spin_unlock() local
157 bit = posix_spinlock_to_offset(l); in pthread_spin_unlock()
158 k_spin_unlock(l, posix_spinlock_key[bit]); in pthread_spin_unlock()