Lines Matching defs:umtx
62 #include <sys/umtx.h>
97 KASSERT(uc->uc_busy != 0, ("umtx chain is not busy")); \
147 "False forces destruction of umtx attached to file, on last close");
155 static MALLOC_DEFINE(M_UMTX, "umtx", "UMTX queue memory");
158 static SYSCTL_NODE(_debug, OID_AUTO, umtx, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
159 "umtx debug");
171 "umtx chain stats");
183 SYSINIT(umtx, SI_SUB_EVENTHANDLER+1, SI_ORDER_MIDDLE, umtxq_sysinit, NULL);
202 "umtx hash stats");
317 "Clear umtx chains statistics");
329 umtx_pi_zone = uma_zcreate("umtx pi", sizeof(struct umtx_pi),
350 mtx_init(&umtx_lock, "umtx lock", NULL, MTX_DEF);
809 * thread was removed from umtx queue.
908 * Lock a umtx object.
911 do_lock_umtx(struct thread *td, struct umtx *umtx, u_long id,
925 * Care must be exercised when dealing with umtx structure. It
932 owner = casuword(&umtx->u_owner, UMTX_UNOWNED, id);
944 owner = casuword(&umtx->u_owner,
969 if ((error = umtx_key_get(umtx, TYPE_SIMPLE_LOCK,
985 old = casuword(&umtx->u_owner, owner, owner | UMTX_CONTESTED);
999 * unlocking the umtx.
1003 error = umtxq_sleep(uq, "umtx", timeout == NULL ? NULL :
1026 * Unlock a umtx object.
1029 do_unlock_umtx(struct thread *td, struct umtx *umtx, u_long id)
1040 owner = fuword(__DEVOLATILE(u_long *, &umtx->u_owner));
1049 old = casuword(&umtx->u_owner, owner, UMTX_UNOWNED);
1058 if ((error = umtx_key_get(umtx, TYPE_SIMPLE_LOCK, AUTO_SHARE,
1068 * When unlocking the umtx, it must be marked as unowned if
1072 old = casuword(&umtx->u_owner, owner,
1089 * Lock a umtx object.
1107 * Care must be exercised when dealing with umtx structure. It
1180 * unlocking the umtx.
1184 error = umtxq_sleep(uq, "umtx", timeout == NULL ?
1207 * Unlock a umtx object.
1249 * When unlocking the umtx, it must be marked as unowned if
1361 * Care must be exercised when dealing with umtx structure. It
1499 * unlocking the umtx.
1566 * When unlocking the umtx, it must be marked as unowned if
2034 KASSERT(uc->uc_busy != 0, ("umtx chain is not busy"));
2266 * Care must be exercised when dealing with umtx structure. It
2403 * umtx. Note that the UMUTEX_RB_OWNERDEAD
2492 * When unlocking the umtx, it must be marked as unowned if
2840 * unlocking the umtx.
3817 return (do_lock_umtx(td, uap->umtx, td->td_tid, 0));
3824 return (do_unlock_umtx(td, uap->umtx, td->td_tid));
5027 return (do_lock_umtx32(td, (uint32_t *)uap->umtx, td->td_tid, NULL));
5034 return (do_unlock_umtx32(td, (uint32_t *)uap->umtx, td->td_tid));
5196 uprintf("comm %s pid %d: reached umtx %smax rb %d\n",
5206 * Clean up umtx data.