История изменений
Исправление luke, (текущая версия) :
Щас глянул что там в Minix 1.7.5:
!*===========================================================================*
!* idle_task *
!*===========================================================================*
_idle_task: ! executed when there is no work
jmp _idle_task ! a "hlt" before this fails in protected mode
UPD: MINIX3:
/*===========================================================================*
* idle *
*===========================================================================*/
static void idle(void)
{
struct proc * p;
/* This function is called whenever there is no work to do.
* Halt the CPU, and measure how many timestamp counter ticks are
* spent not doing anything. This allows test setups to measure
* the CPU utilization of certain workloads with high precision.
*/
p = get_cpulocal_var(proc_ptr) = get_cpulocal_var_ptr(idle_proc);
if (priv(p)->s_flags & BILLABLE)
get_cpulocal_var(bill_ptr) = p;
switch_address_space_idle();
#ifdef CONFIG_SMP
get_cpulocal_var(cpu_is_idle) = 1;
/* we don't need to keep time on APs as it is handled on the BSP */
if (cpuid != bsp_cpu_id)
stop_local_timer();
else
#endif
{
/*
* If the timer has expired while in kernel we must
* rearm it before we go to sleep
*/
restart_local_timer();
}
/* start accounting for the idle time */
context_stop(proc_addr(KERNEL));
#if !SPROFILE
halt_cpu();
#else
if (!sprofiling)
halt_cpu();
else {
volatile int * v;
v = get_cpulocal_var_ptr(idle_interrupted);
interrupts_enable();
while (!*v)
arch_pause();
interrupts_disable();
*v = 0;
}
#endif
/*
* end of accounting for the idle task does not happen here, the kernel
* is handling stuff for quite a while before it gets back here!
*/
}
Исходная версия luke, :
Щас глянул что там в Minix 1.7.5:
!*===========================================================================*
!* idle_task *
!*===========================================================================*
_idle_task: ! executed when there is no work
jmp _idle_task ! a "hlt" before this fails in protected mode