unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

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

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

NAME
     need_resched -- context switch notification

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

     void
     need_resched(struct cpu_info *ci);

DESCRIPTION
     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
     operations:

           o   Set a global flag which is checked by userret(9) when returning
               to user-mode execution.

           o   Post an asynchronous software trap (AST).

SEE ALSO
     scheduler(9), userret(9)

BSD                           September 21, 2002                           BSD