2 Copyright � 2015-2017, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
10 #define __AROS_KERNEL__
12 #include "exec_intern.h"
18 asm volatile ("sti; hlt;");
21 void IdleTask(struct ExecBase
*SysBase
)
24 struct Task
*thisTask
= FindTask(NULL
);
25 struct IntETask
*taskIntEtask
;
26 int cpunum
= KrnGetCPUNumber();
27 ULONG lastcount
= 0, current
;
29 bug("[IDLE:%03d] %s task started\n", cpunum
, thisTask
->tc_Node
.ln_Name
);
36 Supervisor(sleep_function
);
39 if ((taskIntEtask
= GetIntETask(thisTask
)) != NULL
)
41 current
= taskIntEtask
->iet_CpuTime
.tv_secs
;
42 if (current
!= lastcount
)
45 bug("[IDLE:%03d] CPU has idled for %d seconds..\n", cpunum
, lastcount
);
50 bug("[IDLE:%03d] Failed to get IntETask\n", cpunum
);