• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/lib/libthr/thread/

Lines Matching refs:mtx

46 _thr_umutex_init(struct umutex *mtx)
50 *mtx = default_mtx;
62 __thr_umutex_lock(struct umutex *mtx, uint32_t id)
66 if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) != 0)
67 return (_umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, 0));
70 owner = mtx->m_owner;
72 atomic_cmpset_acq_32(&mtx->m_owner, owner, id | owner))
75 atomic_cmpset_acq_32(&mtx->m_owner, owner,
82 _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, 0, 0);
89 __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id)
95 return (__thr_umutex_lock(mtx, id));
96 if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) != 0)
97 return (_umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, 0));
102 owner = mtx->m_owner;
104 atomic_cmpset_acq_32(&mtx->m_owner, owner,
108 atomic_cmpset_acq_32(&mtx->m_owner, owner,
117 _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, 0, 0);
122 __thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
142 if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT |
145 owner = mtx->m_owner;
147 atomic_cmpset_acq_32(&mtx->m_owner, owner,
151 atomic_cmpset_acq_32(&mtx->m_owner, owner,
157 ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0,
160 ret = _umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0,
173 __thr_umutex_unlock(struct umutex *mtx)
176 return (_umtx_op_err(mtx, UMTX_OP_MUTEX_UNLOCK, 0, 0, 0));
180 __thr_umutex_trylock(struct umutex *mtx)
183 return (_umtx_op_err(mtx, UMTX_OP_MUTEX_TRYLOCK, 0, 0, 0));
187 __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling,
191 return (_umtx_op_err(mtx, UMTX_OP_SET_CEILING, ceiling, oldceiling, 0));
195 _thr_umtx_wait(volatile long *mtx, long id, const struct timespec *timeout)
201 return (_umtx_op_err(__DEVOLATILE(void *, mtx), UMTX_OP_WAIT, id, 0,
206 _thr_umtx_wait_uint(volatile u_int *mtx, u_int id,
213 return (_umtx_op_err(__DEVOLATILE(void *, mtx), shared ?
219 _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid,
236 return (_umtx_op_err(__DEVOLATILE(void *, mtx), shared ?
242 _thr_umtx_wake(volatile void *mtx, int nr_wakeup, int shared)
245 return (_umtx_op_err(__DEVOLATILE(void *, mtx), shared ?