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

Function ck_hp_register

freebsd/contrib/ck/src/ck_hp.c:133–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void
134ck_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
153static int
154hazard_compare(const void *a, const void *b)

Callers

nothing calls this directly

Calls 3

memsetFunction · 0.85
ck_stack_initFunction · 0.85
ck_stack_push_upmcFunction · 0.85

Tested by

no test coverage detected