Lines Matching refs:fifo

60 ck_hp_fifo_init(struct ck_hp_fifo *fifo, struct ck_hp_fifo_entry *stub)  in ck_hp_fifo_init()  argument
63 fifo->head = fifo->tail = stub; in ck_hp_fifo_init()
69 ck_hp_fifo_deinit(struct ck_hp_fifo *fifo, struct ck_hp_fifo_entry **stub) in ck_hp_fifo_deinit() argument
72 *stub = fifo->head; in ck_hp_fifo_deinit()
73 fifo->head = fifo->tail = NULL; in ck_hp_fifo_deinit()
79 struct ck_hp_fifo *fifo, in ck_hp_fifo_enqueue_mpmc() argument
90 tail = ck_pr_load_ptr(&fifo->tail); in ck_hp_fifo_enqueue_mpmc()
92 if (tail != ck_pr_load_ptr(&fifo->tail)) in ck_hp_fifo_enqueue_mpmc()
97 ck_pr_cas_ptr(&fifo->tail, tail, next); in ck_hp_fifo_enqueue_mpmc()
99 } else if (ck_pr_cas_ptr(&fifo->tail->next, next, entry) == true) in ck_hp_fifo_enqueue_mpmc()
104 ck_pr_cas_ptr(&fifo->tail, tail, entry); in ck_hp_fifo_enqueue_mpmc()
110 struct ck_hp_fifo *fifo, in ck_hp_fifo_tryenqueue_mpmc() argument
120 tail = ck_pr_load_ptr(&fifo->tail); in ck_hp_fifo_tryenqueue_mpmc()
122 if (tail != ck_pr_load_ptr(&fifo->tail)) in ck_hp_fifo_tryenqueue_mpmc()
127 ck_pr_cas_ptr(&fifo->tail, tail, next); in ck_hp_fifo_tryenqueue_mpmc()
129 } else if (ck_pr_cas_ptr(&fifo->tail->next, next, entry) == false) in ck_hp_fifo_tryenqueue_mpmc()
133 ck_pr_cas_ptr(&fifo->tail, tail, entry); in ck_hp_fifo_tryenqueue_mpmc()
139 struct ck_hp_fifo *fifo, in ck_hp_fifo_dequeue_mpmc() argument
145 head = ck_pr_load_ptr(&fifo->head); in ck_hp_fifo_dequeue_mpmc()
147 tail = ck_pr_load_ptr(&fifo->tail); in ck_hp_fifo_dequeue_mpmc()
149 if (head != ck_pr_load_ptr(&fifo->head)) in ck_hp_fifo_dequeue_mpmc()
154 if (head != ck_pr_load_ptr(&fifo->head)) in ck_hp_fifo_dequeue_mpmc()
161 ck_pr_cas_ptr(&fifo->tail, tail, next); in ck_hp_fifo_dequeue_mpmc()
163 } else if (ck_pr_cas_ptr(&fifo->head, head, next) == true) in ck_hp_fifo_dequeue_mpmc()
173 struct ck_hp_fifo *fifo, in ck_hp_fifo_trydequeue_mpmc() argument
178 head = ck_pr_load_ptr(&fifo->head); in ck_hp_fifo_trydequeue_mpmc()
180 tail = ck_pr_load_ptr(&fifo->tail); in ck_hp_fifo_trydequeue_mpmc()
182 if (head != ck_pr_load_ptr(&fifo->head)) in ck_hp_fifo_trydequeue_mpmc()
187 if (head != ck_pr_load_ptr(&fifo->head)) in ck_hp_fifo_trydequeue_mpmc()
194 ck_pr_cas_ptr(&fifo->tail, tail, next); in ck_hp_fifo_trydequeue_mpmc()
196 } else if (ck_pr_cas_ptr(&fifo->head, head, next) == false) in ck_hp_fifo_trydequeue_mpmc()
206 #define CK_HP_FIFO_FOREACH(fifo, entry) \ argument
207 for ((entry) = CK_HP_FIFO_FIRST(fifo); \
210 #define CK_HP_FIFO_FOREACH_SAFE(fifo, entry, T) \ argument
211 for ((entry) = CK_HP_FIFO_FIRST(fifo); \