Lines Matching refs:lock
15 struct k_spinlock lock; member
41 static inline size_t to_posix_spinlock_idx(pthread_spinlock_t lock) in to_posix_spinlock_idx() argument
43 return mark_pthread_obj_uninitialized(lock); in to_posix_spinlock_idx()
46 static struct k_spinlock *get_posix_spinlock(pthread_spinlock_t *lock) in get_posix_spinlock() argument
51 if (lock == NULL) { in get_posix_spinlock()
56 bit = to_posix_spinlock_idx(*lock); in get_posix_spinlock()
57 if (!is_pthread_obj_initialized(*lock)) { in get_posix_spinlock()
74 int pthread_spin_init(pthread_spinlock_t *lock, int pshared) in pthread_spin_init() argument
79 if (lock == NULL || in pthread_spin_init()
90 *lock = mark_pthread_obj_initialized(bit); in pthread_spin_init()
95 int pthread_spin_destroy(pthread_spinlock_t *lock) in pthread_spin_destroy() argument
101 l = get_posix_spinlock(lock); in pthread_spin_destroy()
114 int pthread_spin_lock(pthread_spinlock_t *lock) in pthread_spin_lock() argument
119 l = get_posix_spinlock(lock); in pthread_spin_lock()
131 int pthread_spin_trylock(pthread_spinlock_t *lock) in pthread_spin_trylock() argument
136 l = get_posix_spinlock(lock); in pthread_spin_trylock()
146 int pthread_spin_unlock(pthread_spinlock_t *lock) in pthread_spin_unlock() argument
151 l = get_posix_spinlock(lock); in pthread_spin_unlock()