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

Function ck_stack_push_upmc

freebsd/contrib/ck/include/ck_stack.h:53–68  ·  view source on GitHub ↗

* Stack producer operation safe for multiple unique producers and multiple consumers. */

Source from the content-addressed store, hash-verified

51 * Stack producer operation safe for multiple unique producers and multiple consumers.
52 */
53CK_CC_INLINE static void
54ck_stack_push_upmc(struct ck_stack *target, struct ck_stack_entry *entry)
55{
56 struct ck_stack_entry *stack;
57
58 stack = ck_pr_load_ptr(&target->head);
59 entry->next = stack;
60 ck_pr_fence_store();
61
62 while (ck_pr_cas_ptr_value(&target->head, stack, entry, &stack) == false) {
63 entry->next = stack;
64 ck_pr_fence_store();
65 }
66
67 return;
68}
69#endif /* CK_F_STACK_PUSH_UPMC */
70
71#ifndef CK_F_STACK_TRYPUSH_UPMC

Callers 5

ck_epoch_registerFunction · 0.85
ck_hp_registerFunction · 0.85
ck_stack_push_mpmcFunction · 0.85
ck_epoch_call_strictFunction · 0.85
ck_hp_stack_push_mpmcFunction · 0.85

Calls 1

ck_pr_cas_ptr_valueFunction · 0.50

Tested by

no test coverage detected