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

Function umtxq_count_pi

freebsd/kern/kern_umtx.c:682–695  ·  view source on GitHub ↗

* Check if there are multiple PI waiters and returns first * waiter. */

Source from the content-addressed store, hash-verified

680 * waiter.
681 */
682static int
683umtxq_count_pi(struct umtx_key *key, struct umtx_q **first)
684{
685 struct umtxq_queue *uh;
686
687 *first = NULL;
688 UMTXQ_LOCKED_ASSERT(umtxq_getchain(key));
689 uh = umtxq_queue_lookup(key, UMTX_SHARED_QUEUE);
690 if (uh != NULL) {
691 *first = TAILQ_FIRST(&uh->head);
692 return (uh->length);
693 }
694 return (0);
695}
696
697/*
698 * Wake up threads waiting on an userland object.

Callers 1

do_unlock_piFunction · 0.85

Calls 2

umtxq_getchainFunction · 0.85
umtxq_queue_lookupFunction · 0.85

Tested by

no test coverage detected