* Stack producer operation safe for multiple unique producers and multiple consumers. */
| 51 | * Stack producer operation safe for multiple unique producers and multiple consumers. |
| 52 | */ |
| 53 | CK_CC_INLINE static void |
| 54 | ck_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 |
no test coverage detected