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

Function sched_preempt

freebsd/kern/sched_4bsd.c:1500–1511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1498}
1499
1500void
1501sched_preempt(struct thread *td)
1502{
1503
1504 SDT_PROBE2(sched, , , surrender, td, td->td_proc);
1505 if (td->td_critnest > 1) {
1506 td->td_owepreempt = 1;
1507 } else {
1508 thread_lock(td);
1509 mi_switch(SW_INVOL | SW_PREEMPT | SWT_PREEMPT);
1510 }
1511}
1512
1513void
1514sched_userret_slowpath(struct thread *td)

Callers

nothing calls this directly

Calls 1

mi_switchFunction · 0.70

Tested by

no test coverage detected