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

Function CK_STACK_CONTAINER

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

Source from the content-addressed store, hash-verified

62#include <ck_string.h>
63
64CK_STACK_CONTAINER(struct ck_hp_record, global_entry, ck_hp_record_container)
65CK_STACK_CONTAINER(struct ck_hp_hazard, pending_entry, ck_hp_hazard_container)
66
67void
68ck_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
85void
86ck_hp_set_threshold(struct ck_hp *state, unsigned int threshold)

Callers

nothing calls this directly

Calls 1

ck_stack_initFunction · 0.85

Tested by

no test coverage detected