Lines Matching refs:lock
49 static struct k_spinlock lock; variable
113 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_mutex, lock, mutex, timeout); in z_impl_k_mutex_lock()
115 key = k_spin_lock(&lock); in z_impl_k_mutex_lock()
130 k_spin_unlock(&lock, key); in z_impl_k_mutex_lock()
132 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, 0); in z_impl_k_mutex_lock()
138 k_spin_unlock(&lock, key); in z_impl_k_mutex_lock()
140 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, -EBUSY); in z_impl_k_mutex_lock()
145 SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(k_mutex, lock, mutex, timeout); in z_impl_k_mutex_lock()
156 int got_mutex = z_pend_curr(&lock, key, &mutex->wait_q, timeout); in z_impl_k_mutex_lock()
164 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, 0); in z_impl_k_mutex_lock()
172 key = k_spin_lock(&lock); in z_impl_k_mutex_lock()
191 z_reschedule(&lock, key); in z_impl_k_mutex_lock()
193 k_spin_unlock(&lock, key); in z_impl_k_mutex_lock()
196 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, lock, mutex, timeout, -EAGAIN); in z_impl_k_mutex_lock()
252 k_spinlock_key_t key = k_spin_lock(&lock); in z_impl_k_mutex_unlock()
273 z_reschedule(&lock, key); in z_impl_k_mutex_unlock()
276 k_spin_unlock(&lock, key); in z_impl_k_mutex_unlock()