Lines Matching refs:mtx
263 struct mtx Giant;
273 mtx_init(struct mtx *mtx, const char *name, const char *type, int opt) in mtx_init() argument
275 mtx->owned = 0; in mtx_init()
276 mtx->parent = mtx; in mtx_init()
280 mtx_lock(struct mtx *mtx) in mtx_lock() argument
282 mtx = mtx->parent; in mtx_lock()
283 mtx->owned++; in mtx_lock()
287 mtx_unlock(struct mtx *mtx) in mtx_unlock() argument
289 mtx = mtx->parent; in mtx_unlock()
290 mtx->owned--; in mtx_unlock()
294 mtx_owned(struct mtx *mtx) in mtx_owned() argument
296 mtx = mtx->parent; in mtx_owned()
297 return (mtx->owned != 0); in mtx_owned()
301 mtx_destroy(struct mtx *mtx) in mtx_destroy() argument
357 cv_wait(struct cv *cv, struct mtx *mtx) in cv_wait() argument
359 cv_timedwait(cv, mtx, -1); in cv_wait()
363 cv_timedwait(struct cv *cv, struct mtx *mtx, int timo) in cv_timedwait() argument
380 mtx_unlock(mtx); in cv_timedwait()
392 mtx_lock(mtx); in cv_timedwait()
424 static struct mtx mtx_callout;
440 mtx_lock(c->mtx); in callout_callback()
453 mtx_unlock(c->mtx); in callout_callback()
487 callout_init_mtx(struct callout *c, struct mtx *mtx, int flags) in callout_init_mtx() argument
491 if (mtx == NULL) in callout_init_mtx()
492 mtx = &Giant; in callout_init_mtx()
494 c->mtx = mtx; in callout_init_mtx()
531 if (c->mtx == NULL) in callout_drain()
534 mtx_lock(c->mtx); in callout_drain()
536 mtx_unlock(c->mtx); in callout_drain()
1136 static struct mtx usb_proc_mtx;