| 459 | } |
| 460 | |
| 461 | struct umtx_q * |
| 462 | umtxq_alloc(void) |
| 463 | { |
| 464 | struct umtx_q *uq; |
| 465 | |
| 466 | uq = malloc(sizeof(struct umtx_q), M_UMTX, M_WAITOK | M_ZERO); |
| 467 | uq->uq_spare_queue = malloc(sizeof(struct umtxq_queue), M_UMTX, |
| 468 | M_WAITOK | M_ZERO); |
| 469 | TAILQ_INIT(&uq->uq_spare_queue->head); |
| 470 | TAILQ_INIT(&uq->uq_pi_contested); |
| 471 | uq->uq_inherited_pri = PRI_MAX; |
| 472 | return (uq); |
| 473 | } |
| 474 | |
| 475 | void |
| 476 | umtxq_free(struct umtx_q *uq) |
no test coverage detected