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

Function ck_epoch_register

freebsd/contrib/ck/src/ck_epoch.c:273–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273void
274ck_epoch_register(struct ck_epoch *global, struct ck_epoch_record *record,
275 void *ct)
276{
277 size_t i;
278
279 record->global = global;
280 record->state = CK_EPOCH_STATE_USED;
281 record->active = 0;
282 record->epoch = 0;
283 record->n_dispatch = 0;
284 record->n_peak = 0;
285 record->n_pending = 0;
286 record->ct = ct;
287 memset(&record->local, 0, sizeof record->local);
288
289 for (i = 0; i < CK_EPOCH_LENGTH; i++)
290 ck_stack_init(&record->pending[i]);
291
292 ck_pr_fence_store();
293 ck_stack_push_upmc(&global->records, &record->record_next);
294 return;
295}
296
297void
298ck_epoch_unregister(struct ck_epoch_record *record)

Callers 1

epoch_ctorFunction · 0.50

Calls 3

memsetFunction · 0.85
ck_stack_initFunction · 0.85
ck_stack_push_upmcFunction · 0.85

Tested by

no test coverage detected