Lines Matching refs:id
39 int __thr_umutex_lock(struct umutex *mtx, uint32_t id) __hidden;
40 int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden;
41 int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
43 int __thr_umutex_unlock(struct umutex *mtx, uint32_t id) __hidden;
76 _thr_umutex_trylock(struct umutex *mtx, uint32_t id)
78 if (atomic_cmpset_acq_32(&mtx->m_owner, UMUTEX_UNOWNED, id))
86 _thr_umutex_trylock2(struct umutex *mtx, uint32_t id)
88 if (atomic_cmpset_acq_32(&mtx->m_owner, UMUTEX_UNOWNED, id) != 0)
92 if (atomic_cmpset_acq_32(&mtx->m_owner, UMUTEX_CONTESTED, id | UMUTEX_CONTESTED))
98 _thr_umutex_lock(struct umutex *mtx, uint32_t id)
100 if (_thr_umutex_trylock2(mtx, id) == 0)
102 return (__thr_umutex_lock(mtx, id));
106 _thr_umutex_lock_spin(struct umutex *mtx, uint32_t id)
108 if (_thr_umutex_trylock2(mtx, id) == 0)
110 return (__thr_umutex_lock_spin(mtx, id));
114 _thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
117 if (_thr_umutex_trylock2(mtx, id) == 0)
119 return (__thr_umutex_timedlock(mtx, id, timeout));
123 _thr_umutex_unlock2(struct umutex *mtx, uint32_t id, int *defer)
131 if (__predict_false((owner & ~UMUTEX_CONTESTED) != id))
143 if (atomic_cmpset_rel_32(&mtx->m_owner, id, UMUTEX_UNOWNED))
145 return (__thr_umutex_unlock(mtx, id));
149 _thr_umutex_unlock(struct umutex *mtx, uint32_t id)
151 return _thr_umutex_unlock2(mtx, id, NULL);