Lines Matching defs:id
45 int __thr_umutex_lock(struct umutex *mtx, uint32_t id) __hidden;
46 int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden;
47 int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
82 _thr_umutex_trylock(struct umutex *mtx, uint32_t id)
85 if (atomic_cmpset_acq_32(&mtx->m_owner, UMUTEX_UNOWNED, id))
89 id | UMUTEX_CONTESTED))
99 _thr_umutex_trylock2(struct umutex *mtx, uint32_t id)
102 if (atomic_cmpset_acq_32(&mtx->m_owner, UMUTEX_UNOWNED, id) != 0)
108 id | UMUTEX_CONTESTED))
112 id | UMUTEX_CONTESTED))
120 _thr_umutex_lock(struct umutex *mtx, uint32_t id)
123 if (_thr_umutex_trylock2(mtx, id) == 0)
125 return (__thr_umutex_lock(mtx, id));
129 _thr_umutex_lock_spin(struct umutex *mtx, uint32_t id)
132 if (_thr_umutex_trylock2(mtx, id) == 0)
134 return (__thr_umutex_lock_spin(mtx, id));
138 _thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
142 if (_thr_umutex_trylock2(mtx, id) == 0)
144 return (__thr_umutex_timedlock(mtx, id, timeout));
148 _thr_umutex_unlock2(struct umutex *mtx, uint32_t id, int *defer)
157 if (atomic_cmpset_rel_32(&mtx->m_owner, id, noncst ?
165 if (__predict_false((owner & ~UMUTEX_CONTESTED) != id))
180 _thr_umutex_unlock(struct umutex *mtx, uint32_t id)
183 return (_thr_umutex_unlock2(mtx, id, NULL));