MCPcopy Create free account
hub / github.com/F-Stack/f-stack / umtxq_alloc

Function umtxq_alloc

freebsd/kern/kern_umtx.c:461–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461struct umtx_q *
462umtxq_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
475void
476umtxq_free(struct umtx_q *uq)

Callers 1

umtx_thread_initFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected