Lines Matching full:pointer
145 * The head pointer is guaranteed to always point to a stub entry. in ck_fifo_spsc_dequeue()
207 struct ck_fifo_mpmc_entry *pointer; member
228 stub->next.pointer = NULL; in ck_fifo_mpmc_init()
230 fifo->head.pointer = fifo->tail.pointer = stub; in ck_fifo_mpmc_init()
239 *garbage = fifo->head.pointer; in ck_fifo_mpmc_deinit()
240 fifo->head.pointer = fifo->tail.pointer = NULL; in ck_fifo_mpmc_deinit()
256 entry->next.pointer = NULL; in ck_fifo_mpmc_enqueue()
263 tail.pointer = ck_pr_load_ptr(&fifo->tail.pointer); in ck_fifo_mpmc_enqueue()
264 next.generation = ck_pr_load_ptr(&tail.pointer->next.generation); in ck_fifo_mpmc_enqueue()
266 next.pointer = ck_pr_load_ptr(&tail.pointer->next.pointer); in ck_fifo_mpmc_enqueue()
271 if (next.pointer != NULL) { in ck_fifo_mpmc_enqueue()
273 * If the tail pointer has an entry following it then in ck_fifo_mpmc_enqueue()
278 update.pointer = next.pointer; in ck_fifo_mpmc_enqueue()
286 update.pointer = entry; in ck_fifo_mpmc_enqueue()
288 if (ck_pr_cas_ptr_2(&tail.pointer->next, &next, &update) == true) in ck_fifo_mpmc_enqueue()
309 entry->next.pointer = NULL; in ck_fifo_mpmc_tryenqueue()
316 tail.pointer = ck_pr_load_ptr(&fifo->tail.pointer); in ck_fifo_mpmc_tryenqueue()
317 next.generation = ck_pr_load_ptr(&tail.pointer->next.generation); in ck_fifo_mpmc_tryenqueue()
319 next.pointer = ck_pr_load_ptr(&tail.pointer->next.pointer); in ck_fifo_mpmc_tryenqueue()
324 if (next.pointer != NULL) { in ck_fifo_mpmc_tryenqueue()
326 * If the tail pointer has an entry following it then in ck_fifo_mpmc_tryenqueue()
331 update.pointer = next.pointer; in ck_fifo_mpmc_tryenqueue()
340 update.pointer = entry; in ck_fifo_mpmc_tryenqueue()
342 if (ck_pr_cas_ptr_2(&tail.pointer->next, &next, &update) == false) in ck_fifo_mpmc_tryenqueue()
364 head.pointer = ck_pr_load_ptr(&fifo->head.pointer); in ck_fifo_mpmc_dequeue()
367 tail.pointer = ck_pr_load_ptr(&fifo->tail.pointer); in ck_fifo_mpmc_dequeue()
369 next.generation = ck_pr_load_ptr(&head.pointer->next.generation); in ck_fifo_mpmc_dequeue()
371 next.pointer = ck_pr_load_ptr(&head.pointer->next.pointer); in ck_fifo_mpmc_dequeue()
373 update.pointer = next.pointer; in ck_fifo_mpmc_dequeue()
374 if (head.pointer == tail.pointer) { in ck_fifo_mpmc_dequeue()
380 if (next.pointer == NULL) in ck_fifo_mpmc_dequeue()
383 /* Forward the tail pointer if necessary. */ in ck_fifo_mpmc_dequeue()
392 if (next.pointer == NULL) in ck_fifo_mpmc_dequeue()
396 *(void **)value = ck_pr_load_ptr(&next.pointer->value); in ck_fifo_mpmc_dequeue()
398 /* Forward the head pointer to the next entry. */ in ck_fifo_mpmc_dequeue()
405 *garbage = head.pointer; in ck_fifo_mpmc_dequeue()
418 head.pointer = ck_pr_load_ptr(&fifo->head.pointer); in ck_fifo_mpmc_trydequeue()
422 tail.pointer = ck_pr_load_ptr(&fifo->tail.pointer); in ck_fifo_mpmc_trydequeue()
424 next.generation = ck_pr_load_ptr(&head.pointer->next.generation); in ck_fifo_mpmc_trydequeue()
426 next.pointer = ck_pr_load_ptr(&head.pointer->next.pointer); in ck_fifo_mpmc_trydequeue()
428 update.pointer = next.pointer; in ck_fifo_mpmc_trydequeue()
429 if (head.pointer == tail.pointer) { in ck_fifo_mpmc_trydequeue()
435 if (next.pointer == NULL) in ck_fifo_mpmc_trydequeue()
438 /* Forward the tail pointer if necessary. */ in ck_fifo_mpmc_trydequeue()
447 if (next.pointer == NULL) in ck_fifo_mpmc_trydequeue()
451 *(void **)value = ck_pr_load_ptr(&next.pointer->value); in ck_fifo_mpmc_trydequeue()
453 /* Forward the head pointer to the next entry. */ in ck_fifo_mpmc_trydequeue()
459 *garbage = head.pointer; in ck_fifo_mpmc_trydequeue()
463 #define CK_FIFO_MPMC_ISEMPTY(f) ((f)->head.pointer->next.pointer == NULL)
464 #define CK_FIFO_MPMC_FIRST(f) ((f)->head.pointer->next.pointer)
465 #define CK_FIFO_MPMC_NEXT(m) ((m)->next.pointer)
472 (entry) != NULL && ((T) = (entry)->next.pointer, 1); \