cpu_need_resched man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

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

NAME
     cpu_need_resched — context switch notification

SYNOPSIS
     #include <sys/cpu.h>

     void
     cpu_need_resched(struct cpu_info *ci, int flags);

DESCRIPTION
     The 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, on the cpu 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.

     If RESCHED_KPREEMPT flag is specified in flags and __HAVE_PREEMPTION C
     pre-processor macro is defined in <machine/intr.h>, machine-dependent
     code should make a context switch happen as soon as possible even if the
     cpu is running the kernel code.

     If RESCHED_IMMED flag is specified in flags, machine-dependent code
     should make a context switch happen as soon as possible.  In that case,
     for example, if ci is not the current processor, cpu_need_resched() typi‐
     cally issues an inter processor call to the processor to make it notice
     the need of a context switch as soon as possible.

     Typically, the cpu_need_resched() function will perform the following
     operations:

	   ·   Set a per-processor flag which is checked by userret(9) when
	       returning to user-mode execution.

	   ·   Post an asynchronous software trap (AST).

	   ·   Send an inter processor interrupt to wake up cpu_idle(9).

SEE ALSO
     sched_4bsd(9), userret(9)

BSD				 July 31, 2010				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net