forked from luck/tmp_suning_uos_patched
2ff2d3d747
Add a notifier mechanism to the low level idle loop. You can register a callback function which gets invoked on entry and exit from the low level idle loop. The low level idle loop is defined as the polling loop, low-power call, or the mwait instruction. Interrupts processed by the idle thread are not considered part of the low level loop. The notifier can be used to measure precisely how much is spent in useless execution (or low power mode). The perfmon subsystem uses it to turn on/off monitoring. Signed-off-by: stephane eranian <eranian@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
15 lines
283 B
C
15 lines
283 B
C
#ifndef _ASM_I386_IDLE_H
|
|
#define _ASM_I386_IDLE_H 1
|
|
|
|
#define IDLE_START 1
|
|
#define IDLE_END 2
|
|
|
|
struct notifier_block;
|
|
void idle_notifier_register(struct notifier_block *n);
|
|
void idle_notifier_unregister(struct notifier_block *n);
|
|
|
|
void exit_idle(void);
|
|
void enter_idle(void);
|
|
|
|
#endif
|