| 131 | } |
| 132 | |
| 133 | void |
| 134 | ck_hp_register(struct ck_hp *state, |
| 135 | struct ck_hp_record *entry, |
| 136 | void **pointers) |
| 137 | { |
| 138 | |
| 139 | entry->state = CK_HP_USED; |
| 140 | entry->global = state; |
| 141 | entry->pointers = pointers; |
| 142 | entry->n_pending = 0; |
| 143 | entry->n_peak = 0; |
| 144 | entry->n_reclamations = 0; |
| 145 | memset(pointers, 0, state->degree * sizeof(void *)); |
| 146 | ck_stack_init(&entry->pending); |
| 147 | ck_pr_fence_store(); |
| 148 | ck_stack_push_upmc(&state->subscribers, &entry->global_entry); |
| 149 | ck_pr_inc_uint(&state->n_subscribers); |
| 150 | return; |
| 151 | } |
| 152 | |
| 153 | static int |
| 154 | hazard_compare(const void *a, const void *b) |
nothing calls this directly
no test coverage detected