Index: sys/kern/subr_epoch.c =================================================================== --- sys/kern/subr_epoch.c +++ sys/kern/subr_epoch.c @@ -579,6 +579,17 @@ callback(ctx); } +void +epoch_call_drain(epoch_t epoch) +{ + int cpu; + + CPU_FOREACH(cpu) { + gtaskqueue_drain_all( + (DPCPU_ID_PTR(cpu, epoch_cb_task))->gt_taskqueue); + } +} + static void epoch_call_task(void *arg __unused) { Index: sys/sys/epoch.h =================================================================== --- sys/sys/epoch.h +++ sys/sys/epoch.h @@ -70,6 +70,7 @@ void epoch_wait(epoch_t epoch); void epoch_wait_preempt(epoch_t epoch); void epoch_call(epoch_t epoch, epoch_context_t ctx, void (*callback) (epoch_context_t)); +void epoch_call_drain(epoch_t epoch); int in_epoch(epoch_t epoch); int in_epoch_verbose(epoch_t epoch, int dump_onfail); DPCPU_DECLARE(int, epoch_cb_count);