MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / hook_remove_locked

Function hook_remove_locked

deps/jemalloc/src/hook.c:58–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58static void
59hook_remove_locked(seq_hooks_t *to_remove) {
60 hooks_internal_t hooks_internal;
61 bool success = seq_try_load_hooks(&hooks_internal, to_remove);
62 /* We hold mu; no concurrent access. */
63 assert(success);
64 /* Should only remove hooks that were added. */
65 assert(hooks_internal.in_use);
66 hooks_internal.in_use = false;
67 seq_store_hooks(to_remove, &hooks_internal);
68 atomic_store_u(&nhooks, atomic_load_u(&nhooks, ATOMIC_RELAXED) - 1,
69 ATOMIC_RELAXED);
70}
71
72void
73hook_remove(tsdn_t *tsdn, void *opaque) {

Callers 1

hook_removeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected