Lines Matching full:owner

45  * is protecting things like owner thread priorities which aren't
57 mutex->owner = NULL; in z_impl_k_mutex_init()
93 if (mutex->owner->base.prio != new_prio) { in adjust_owner_prio()
96 mutex->owner, z_is_thread_ready(mutex->owner) ? in adjust_owner_prio()
98 new_prio, mutex->owner->base.prio); in adjust_owner_prio()
100 return z_thread_prio_set(mutex->owner, new_prio); in adjust_owner_prio()
117 if (likely((mutex->lock_count == 0U) || (mutex->owner == arch_current_thread()))) { in z_impl_k_mutex_lock()
124 mutex->owner = arch_current_thread(); in z_impl_k_mutex_lock()
148 mutex->owner->base.prio); in z_impl_k_mutex_lock()
152 if (z_is_prio_higher(new_prio, mutex->owner->base.prio)) { in z_impl_k_mutex_lock()
176 * If so, skip adjusting owner's priority down. in z_impl_k_mutex_lock()
178 if (likely(mutex->owner != NULL)) { in z_impl_k_mutex_lock()
219 CHECKIF(mutex->owner == NULL) { in z_impl_k_mutex_unlock()
227 CHECKIF(mutex->owner != arch_current_thread()) { in z_impl_k_mutex_unlock()
235 * cannot be zero if the current thread is equal to mutex->owner, in z_impl_k_mutex_unlock()
244 * If we are the owner and count is greater than 1, then decrement in z_impl_k_mutex_unlock()
245 * the count and return and keep current thread as the owner. in z_impl_k_mutex_unlock()
256 /* Get the new owner, if any */ in z_impl_k_mutex_unlock()
259 mutex->owner = new_owner; in z_impl_k_mutex_unlock()
261 LOG_DBG("new owner of mutex %p: %p (prio: %d)", in z_impl_k_mutex_unlock()
266 * new owner is already of higher or equal prio than first in z_impl_k_mutex_unlock()