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

Function _epoch_enter_preempt

freebsd/kern/subr_epoch.c:438–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436 } while (0)
437
438void
439_epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE)
440{
441 struct epoch_record *er;
442 struct thread *td;
443
444 MPASS(cold || epoch != NULL);
445 MPASS(epoch->e_flags & EPOCH_PREEMPT);
446 td = curthread;
447 MPASS((vm_offset_t)et >= td->td_kstack &&
448 (vm_offset_t)et + sizeof(struct epoch_tracker) <=
449 td->td_kstack + td->td_kstack_pages * PAGE_SIZE);
450
451 INIT_CHECK(epoch);
452#ifdef EPOCH_TRACE
453 epoch_trace_enter(td, epoch, et, file, line);
454#endif
455 et->et_td = td;
456 THREAD_NO_SLEEPING();
457 critical_enter();
458 sched_pin();
459 td->td_pre_epoch_prio = td->td_priority;
460 er = epoch_currecord(epoch);
461 /* Record-level tracking is reserved for non-preemptible epochs. */
462 MPASS(er->er_td == NULL);
463 TAILQ_INSERT_TAIL(&er->er_tdlist, et, et_link);
464 ck_epoch_begin(&er->er_record, &et->et_section);
465 critical_exit();
466}
467
468void
469epoch_enter(epoch_t epoch)

Callers

nothing calls this directly

Calls 6

epoch_trace_enterFunction · 0.85
sched_pinFunction · 0.85
epoch_currecordFunction · 0.85
ck_epoch_beginFunction · 0.85
critical_enterFunction · 0.50
critical_exitFunction · 0.50

Tested by

no test coverage detected