unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (NetBSD-2.0)
Page:
Section:
Apropos / Subsearch:
optional field

CHOOSEPROC(9)            BSD Kernel Developer's Manual           CHOOSEPROC(9)

NAME
     chooseproc -- select next process from system run queue

SYNOPSIS
     #include <&lt;sys/proc.h>&gt;

     struct proc *
     chooseproc(void);

DESCRIPTION
     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
     process.

     The chooseproc() function must be called with the scheduler lock held
     (see SCHED_LOCK(9)) and at the splsched(9) interrupt protection level.

SEE ALSO
     cpu_idle(9), mi_switch(9), scheduler(9), splsched(9)

BSD                           September 21, 2002                           BSD