update after yamt-idlelwp merge.

This commit is contained in:
yamt 2007-05-17 15:06:25 +00:00
parent 6ba36ace69
commit e513490beb
1 changed files with 20 additions and 5 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: cpu_need_resched.9,v 1.4 2007/02/17 17:35:52 yamt Exp $
.\" $NetBSD: cpu_need_resched.9,v 1.5 2007/05/17 15:06:25 yamt Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -34,24 +34,39 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 18, 2007
.Dd May 18, 2007
.Dt CPU_NEED_RESCHED 9
.Os
.Sh NAME
.Nm cpu_need_resched
.Nd context switch notification
.Sh SYNOPSIS
.In sys/proc.h
.In sys/cpu.h
.Ft void
.Fn cpu_need_resched "struct cpu_info *ci"
.Fn cpu_need_resched "struct cpu_info *ci" "int flags"
.Sh DESCRIPTION
The
.Fn cpu_need_resched
function is the machine-independent interface for the scheduler to
notify machine-dependent code that a context switch from the current
LWP is required.
LWP, on the cpu
.Fa ci ,
is required.
This event may occur if a higher priority LWP appears on the run
queue or if the current LWP has exceeded its time slice.
.Pp
If
.Dv
RESCHED_IMMED
flag is specified in
.Fa flags ,
machine-dependent code should make a context switch happen as soon as possible.
In that case, for example, if
.Fa ci
is not the current processor,
.Fn cpu_need_resched
typically issues an inter processor call to the processor to make it
notice the need of a context switch as soon as possible.
.Sh EXAMPLES
Specifically, the
.Fn cpu_need_resched