2 Copyright © 2013, The AROS Development Team. All rights reserved.
8 #include <aros/debug.h>
10 #include <aros/kernel.h>
11 #include <aros/symbolsets.h>
12 #include <exec/memory.h>
13 #include <exec/tasks.h>
14 #include <exec/alerts.h>
15 #include <exec/execbase.h>
17 #include <proto/exec.h>
20 /* Linked from kernel.resource,
21 * need to retrieve in a cleaner fashion .. */
24 extern void IdleTask(struct ExecBase
*);
26 struct Task
*sysIdleTask
= NULL
;
28 static int PlatformInit(struct ExecBase
*SysBase
)
30 D(bug("[Exec] PlatformInit()\n"));
32 struct Task
*BootTask
= SysBase
->ThisTask
;
33 D(bug("[Exec] PlatformInit: Boot Task @ 0x%p\n", BootTask
));
35 /* for our sanity we will tell exec about the correct stack for the boot task */
36 BootTask
->tc_SPLower
= stack
;
37 BootTask
->tc_SPUpper
= stack
+ AROS_STACKSIZE
;
39 sysIdleTask
= NewCreateTask(TASKTAG_NAME
, "System Idle",
40 #if defined(__AROSEXEC_SMP__)
41 TASKTAG_AFFINITY
, ~0,
44 TASKTAG_PC
, IdleTask
,
45 TASKTAG_ARG1
, SysBase
,
48 sysIdleTask
->tc_State
= TS_WAIT
;
50 D(bug("[Exec] PlatformInit: Idle Task @ 0x%p\n", sysIdleTask
));
55 ADD2INITLIB(PlatformInit
, 0)