Lines Matching refs:lock
47 static struct k_spinlock lock; variable
111 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_mutex, lock, mutex, timeout); in z_impl_k_mutex_lock()
113 key = k_spin_lock(&lock); in z_impl_k_mutex_lock()
128 k_spin_unlock(&lock, key); in z_impl_k_mutex_lock()
130 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, 0); in z_impl_k_mutex_lock()
136 k_spin_unlock(&lock, key); in z_impl_k_mutex_lock()
138 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, -EBUSY); in z_impl_k_mutex_lock()
143 SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(k_mutex, lock, mutex, timeout); in z_impl_k_mutex_lock()
154 int got_mutex = z_pend_curr(&lock, key, &mutex->wait_q, timeout); in z_impl_k_mutex_lock()
162 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, 0); in z_impl_k_mutex_lock()
170 key = k_spin_lock(&lock); in z_impl_k_mutex_lock()
189 z_reschedule(&lock, key); in z_impl_k_mutex_lock()
191 k_spin_unlock(&lock, key); in z_impl_k_mutex_lock()
194 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, -EAGAIN); in z_impl_k_mutex_lock()
250 k_spinlock_key_t key = k_spin_lock(&lock); in z_impl_k_mutex_unlock()
271 z_reschedule(&lock, key); in z_impl_k_mutex_unlock()
274 k_spin_unlock(&lock, key); in z_impl_k_mutex_unlock()