Copyright clean-up (part 1):
[AROS.git] / arch / all-hosted / hostlib / hostlib_init.c
blob57faa92d094b6da98015a8819452ca390ca36a70
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
7 #include <aros/kernel.h>
8 #include <aros/symbolsets.h>
9 #include <utility/tagitem.h>
10 #include <proto/arossupport.h>
11 #include <proto/exec.h>
12 #include <proto/kernel.h>
14 #include "hostlib_intern.h"
16 static int HostLib_Init(struct HostLibBase *HostLibBase)
18 APTR KernelBase;
19 struct TagItem *tag;
21 KernelBase = OpenResource("kernel.resource");
22 D(bug("[hostlib] KernelBase = 0x%08lX\n", KernelBase));
23 if (!KernelBase)
24 return FALSE;
26 tag = LibFindTagItem(KRN_HostInterface, KrnGetBootInfo());
27 if (tag)
29 HostLibBase->HostIFace = (struct HostInterface *)tag->ti_Data;
30 D(bug("[hostlib] HostIFace = 0x%08lX\n", HostLibBase->HostIFace));
32 #ifndef USE_FORBID_LOCK
33 InitSemaphore(&HostLibBase->HostSem);
34 #endif
35 return TRUE;
38 return FALSE;
41 ADD2INITLIB(HostLib_Init, 0)