CHOOSEPROC(9) BSD Kernel Developer's Manual CHOOSEPROC(9)
chooseproc -- select next process from system run queue
struct proc *
The chooseproc() function is invoked by the scheduler to select the high-
est priority process from the system run queue. If a process is not
available on the system run queue, chooseproc() shall go into an ``idle''
loop by invoking cpu_idle(9). The variable curproc is set to NULL while
chooseproc() is idle so that CPU time is not allocated to the outgoing
The chooseproc() function must be called with the scheduler lock held
(see SCHED_LOCK(9)) and at the splsched(9) interrupt protection level.
cpu_idle(9), mi_switch(9), scheduler(9), splsched(9)
BSD September 21, 2002 BSD