| 62 | #include <ck_string.h> |
| 63 | |
| 64 | CK_STACK_CONTAINER(struct ck_hp_record, global_entry, ck_hp_record_container) |
| 65 | CK_STACK_CONTAINER(struct ck_hp_hazard, pending_entry, ck_hp_hazard_container) |
| 66 | |
| 67 | void |
| 68 | ck_hp_init(struct ck_hp *state, |
| 69 | unsigned int degree, |
| 70 | unsigned int threshold, |
| 71 | ck_hp_destructor_t destroy) |
| 72 | { |
| 73 | |
| 74 | state->threshold = threshold; |
| 75 | state->degree = degree; |
| 76 | state->destroy = destroy; |
| 77 | state->n_subscribers = 0; |
| 78 | state->n_free = 0; |
| 79 | ck_stack_init(&state->subscribers); |
| 80 | ck_pr_fence_store(); |
| 81 | |
| 82 | return; |
| 83 | } |
| 84 | |
| 85 | void |
| 86 | ck_hp_set_threshold(struct ck_hp *state, unsigned int threshold) |
nothing calls this directly
no test coverage detected