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

Function _epoch_exit_preempt

freebsd/kern/subr_epoch.c:489–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void
490_epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE)
491{
492 struct epoch_record *er;
493 struct thread *td;
494
495 INIT_CHECK(epoch);
496 td = curthread;
497 critical_enter();
498 sched_unpin();
499 THREAD_SLEEPING_OK();
500 er = epoch_currecord(epoch);
501 MPASS(epoch->e_flags & EPOCH_PREEMPT);
502 MPASS(et != NULL);
503 MPASS(et->et_td == td);
504#ifdef INVARIANTS
505 et->et_td = (void*)0xDEADBEEF;
506 /* Record-level tracking is reserved for non-preemptible epochs. */
507 MPASS(er->er_td == NULL);
508#endif
509 ck_epoch_end(&er->er_record, &et->et_section);
510 TAILQ_REMOVE(&er->er_tdlist, et, et_link);
511 er->er_gen++;
512 if (__predict_false(td->td_pre_epoch_prio != td->td_priority))
513 epoch_adjust_prio(td, td->td_pre_epoch_prio);
514 critical_exit();
515#ifdef EPOCH_TRACE
516 epoch_trace_exit(td, epoch, et, file, line);
517#endif
518}
519
520void
521epoch_exit(epoch_t epoch)

Callers

nothing calls this directly

Calls 7

sched_unpinFunction · 0.85
epoch_currecordFunction · 0.85
ck_epoch_endFunction · 0.85
epoch_adjust_prioFunction · 0.85
epoch_trace_exitFunction · 0.85
critical_enterFunction · 0.50
critical_exitFunction · 0.50

Tested by

no test coverage detected