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

Function prof_thread_active_init_ctl

deps/jemalloc/src/ctl.c:2637–2663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2635/******************************************************************************/
2636
2637static int
2638prof_thread_active_init_ctl(tsd_t *tsd, const size_t *mib,
2639 size_t miblen, void *oldp, size_t *oldlenp, void *newp,
2640 size_t newlen) {
2641 int ret;
2642 bool oldval;
2643
2644 if (!config_prof) {
2645 return ENOENT;
2646 }
2647
2648 if (newp != NULL) {
2649 if (newlen != sizeof(bool)) {
2650 ret = EINVAL;
2651 goto label_return;
2652 }
2653 oldval = prof_thread_active_init_set(tsd_tsdn(tsd),
2654 *(bool *)newp);
2655 } else {
2656 oldval = prof_thread_active_init_get(tsd_tsdn(tsd));
2657 }
2658 READ(oldval, bool);
2659
2660 ret = 0;
2661label_return:
2662 return ret;
2663}
2664
2665static int
2666prof_active_ctl(tsd_t *tsd, const size_t *mib, size_t miblen,

Callers

nothing calls this directly

Calls 3

tsd_tsdnFunction · 0.50

Tested by

no test coverage detected