use IntETask() instead of GetIntETask(). minor debug changes/delint.
[AROS.git] / arch / arm-native / exec / exec_idle.c
blob1f989ee6e58be1c13478557b96f9c113452f76b8
1 /*
2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define DEBUG 0
8 #include <proto/exec.h>
9 #include "exec_intern.h"
10 #include "kernel_intern.h"
11 #include "kernel_cpu.h"
12 #include "kernel_syscall.h"
14 #include "etask.h"
16 void IdleTask(struct ExecBase *SysBase)
18 #if defined(DEBUG)
19 struct Task *thisTask = FindTask(NULL);
20 int cpunum = GetCPUNumber();
21 #endif
23 D(bug("[IDLE:%02d] %s started up\n", cpunum, thisTask->tc_Node.ln_Name));
25 asm volatile ("swi %[swi_no]" : : [swi_no] "I" (SC_SUPERSTATE) : "lr");
26 asm volatile ("swi %[swi_no]" : : [swi_no] "I" (SC_STI) : "lr");
30 /* forever */
31 D(bug("[IDLE:%02d] CPU has idled for %d seconds..\n", GetIntETask(thisTask)->iet_CpuTime.tv_secs));
32 asm volatile("mov r0, #0\n\t mcr p15, 0, r0, c7, c0, 4":::"r0");
33 } while(1);