* Check if there are multiple PI waiters and returns first * waiter. */
| 680 | * waiter. |
| 681 | */ |
| 682 | static int |
| 683 | umtxq_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. |
no test coverage detected