kernels/linux-2.4.0/arch/i386/kernel/apm.c
/*
 * This is the idle thing.
 */
This is the idle thing.
This is the idle thing .
static void apm_cpu_idle(void)
{
	unsigned int start_idle;
	start_idle = jiffies;
	while (1) {
		if (!current->need_resched) {
			if (jiffies - start_idle < HARD_IDLE_TIMEOUT) {
				if (!current_cpu_data.hlt_works_ok)
					continue;
				if (hlt_counter)
					continue;
				__cli();
				if (!current->need_resched)
					safe_halt();
				else
					__sti();
				continue;
			}
			powermanagement_idle();
		}
		schedule();
		check_pgt_cache();
		start_idle = jiffies;
	}
}
static void apm_cpu_idle ( void ) { unsigned int start_idle ; start_idle = jiffies ; while ( 1 ) { if ( ! current -> need_resched ) { if ( jiffies - start_idle < HARD_IDLE_TIMEOUT ) { if ( ! current_cpu_data . hlt_works_ok ) continue ; if ( hlt_counter ) continue ; __cli ( ) ; if ( ! current -> need_resched ) safe_halt ( ) ; else __sti ( ) ; continue ; } powermanagement_idle ( ) ; } schedule ( ) ; check_pgt_cache ( ) ; start_idle = jiffies ; } }
This is the idle thing.
This is the idle thing .
/*
			 * Ok, do some power management - we've been idle for too long
			 */