- NetBSD Manual Pages
CPU_IDLE(9) NetBSD Kernel Developer's Manual CPU_IDLE(9)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
cpu_idle -- machine-dependent processor idling interface
cpu_idle() is called by machine-independent code when the processor has
nothing to do. It can be used to conserve the processor power, for exam-
cpu_idle() returns immediately if cpu_need_resched() has been called for
the processor after the last call of cpu_idle() or cpu_did_resched() on
the processor. cpu_idle() returns as soon as possible when
cpu_need_resched() is called for the processor. Otherwise, it returns
whenever it likes.
cpu_idle() is called at IPL_NONE, without any locks held.
The simplest (and, in some cases, the best) implementation of cpu_idle()
is the following.
/* nothing */
cpu_need_resched(9), cpu_switchto(9), intro(9), spl(9)
NetBSD 9.1 April 20, 2007 NetBSD 9.1