Added 'Resident' field to ensure that the handler is included in the
[AROS.git] / rom / timer / common_init.c
blobd6c0610f180c40351499cff43c6463788c93256b
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Timer startup, common part
6 */
8 #include <aros/symbolsets.h>
9 #include <exec/lists.h>
10 #include <proto/exec.h>
12 #include "timer_intern.h"
14 static int common_Init(struct TimerBase *LIBBASE)
16 ULONG i;
18 /* kernel.resource is optional for some implementations, so no check */
19 LIBBASE->tb_KernelBase = OpenResource("kernel.resource");
21 /* Setup the timer.device data */
22 LIBBASE->tb_CurrentTime.tv_secs = 0;
23 LIBBASE->tb_CurrentTime.tv_micro = 0;
24 LIBBASE->tb_Elapsed.tv_secs = 0;
25 LIBBASE->tb_Elapsed.tv_micro = 0;
27 /* Initialise the lists */
28 for (i = 0; i < NUM_LISTS; i++)
29 NEWLIST(&LIBBASE->tb_Lists[i]);
31 return TRUE;
34 /* This is run before hardware-specific init which has zero priority */
35 ADD2INITLIB(common_Init, -10);