NEED_RESCHED(9) BSD Kernel Developer's Manual NEED_RESCHED(9)
need_resched -- context switch notification
need_resched(struct cpu_info *ci);
The need_resched() function is the machine-independent interface for the
scheduler to notify machine-dependent code that a context switch from the
current process is required. This event may occur if a higher priority
process appears on the run queue or if the current process has exceeded
its time slice.
Specifically, the need_resched() function will perform the following
o Set a global flag which is checked by userret(9) when returning
to user-mode execution.
o Post an asynchronous software trap (AST).
BSD September 21, 2002 BSD