Lines Matching refs:fq
754 futex_queue_tid_best(const struct futex_queue *fq)
757 return (STAILQ_FIRST(&fq->fq_list)->fw_tid);
761 futex_queue_count(const struct futex_queue *fq)
764 return (fq->fq_count);
768 futex_queue_init(struct futex_queue *fq)
771 STAILQ_INIT(&fq->fq_list);
772 fq->fq_count = 0;
811 futex_queue_sleep(struct futex_queue *fq, struct futex_lock *fl,
832 fw->fw_queue = fq;
833 STAILQ_INSERT_TAIL(&fq->fq_list, fw, fw_next);
834 ++fq->fq_count;
849 fw->fw_queue != NULL && fw->fw_queue != fq) {
865 fq = fw->fw_queue;
866 if (fq == NULL) {
873 STAILQ_REMOVE(&fq->fq_list, fw, futex_waiter, fw_next);
874 --fq->fq_count;
899 futex_queue_wake_up_all(struct futex_queue *fq)
903 STAILQ_FOREACH(fw, &fq->fq_list, fw_next) {
909 STAILQ_INIT(&fq->fq_list);
910 fq->fq_count = 0;
918 futex_queue_wake_up_best(struct futex_queue *fq)
922 fw = STAILQ_FIRST(&fq->fq_list);
927 STAILQ_REMOVE_HEAD(&fq->fq_list, fw_next);
928 --fq->fq_count;
932 futex_queue_wake_up_donate(struct futex_queue *fq, unsigned int nwaiters)
936 fw = STAILQ_FIRST(&fq->fq_list);
943 STAILQ_REMOVE_HEAD(&fq->fq_list, fw_next);
944 --fq->fq_count;
945 futex_queue_requeue(fq, &fw->fw_donated, nwaiters);
1076 struct futex_queue fq;
1084 futex_queue_init(&fq);
1086 precision, abstime, &fq);