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

Function epoch_call

freebsd/kern/subr_epoch.c:753–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751}
752
753void
754epoch_call(epoch_t epoch, epoch_callback_t callback, epoch_context_t ctx)
755{
756 epoch_record_t er;
757 ck_epoch_entry_t *cb;
758
759 cb = (void *)ctx;
760
761 MPASS(callback);
762 /* too early in boot to have epoch set up */
763 if (__predict_false(epoch == NULL))
764 goto boottime;
765#if !defined(EARLY_AP_STARTUP)
766 if (__predict_false(inited < 2))
767 goto boottime;
768#endif
769
770 critical_enter();
771 *DPCPU_PTR(epoch_cb_count) += 1;
772 er = epoch_currecord(epoch);
773 ck_epoch_call(&er->er_record, cb, (ck_epoch_cb_t *)callback);
774 critical_exit();
775 return;
776boottime:
777 callback(ctx);
778}
779
780static void
781epoch_call_task(void *arg __unused)

Callers 12

epoch_drain_callbacksFunction · 0.70
rtfreeFunction · 0.50
rib_unsibscribeFunction · 0.50
rib_unsibscribe_lockedFunction · 0.50
nhops_destroy_ribFunction · 0.50
replace_rtables_familyFunction · 0.50
grow_rtables_familyFunction · 0.50
nhgrp_freeFunction · 0.50
nhop_freeFunction · 0.50

Calls 5

epoch_currecordFunction · 0.85
ck_epoch_callFunction · 0.85
critical_enterFunction · 0.50
critical_exitFunction · 0.50
callbackClass · 0.50

Tested by

no test coverage detected