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

Function epoch_ctor

freebsd/kern/subr_epoch.c:308–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306#endif
307
308static void
309epoch_ctor(epoch_t epoch)
310{
311 epoch_record_t er;
312 int cpu;
313
314 epoch->e_pcpu_record = uma_zalloc_pcpu(pcpu_zone_record, M_WAITOK);
315 CPU_FOREACH(cpu) {
316 er = zpcpu_get_cpu(epoch->e_pcpu_record, cpu);
317 bzero(er, sizeof(*er));
318 ck_epoch_register(&epoch->e_epoch, &er->er_record, NULL);
319 TAILQ_INIT((struct threadlist *)(uintptr_t)&er->er_tdlist);
320 er->er_cpuid = cpu;
321 er->er_parent = epoch;
322 }
323}
324
325static void
326epoch_adjust_prio(struct thread *td, u_char prio)

Callers 1

epoch_allocFunction · 0.85

Calls 3

bzeroFunction · 0.85
uma_zalloc_pcpuFunction · 0.50
ck_epoch_registerFunction · 0.50

Tested by

no test coverage detected