make the linux-ppc packags be in synch with other platforms
[tangerine.git] / arch / all-linux / hidd / linux_init.c
blob31e14d86d5a176abc045f21c0f7c408a93d35f17
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Linux hidd initialization code.
6 Lang: English.
7 */
9 #define __OOP_NOATTRBASES__
11 #include <stddef.h>
12 #include <stdio.h>
13 #include <stdlib.h>
15 #include <exec/types.h>
17 #include <proto/exec.h>
18 #include <proto/oop.h>
20 #include <utility/utility.h>
21 #include <oop/oop.h>
22 #include <hidd/graphics.h>
24 #include <aros/symbolsets.h>
26 #include "linux_intern.h"
28 #include LC_LIBDEFS_FILE
29 #undef SDEBUG
30 #undef DEBUG
31 #define DEBUG 0
32 #include <aros/debug.h>
34 static OOP_AttrBase HiddPixFmtAttrBase = 0;
36 static struct OOP_ABDescr abd[] = {
37 { IID_Hidd_PixFmt, &HiddPixFmtAttrBase },
38 { NULL, NULL }
41 static int Init_Hidd(LIBBASETYPEPTR LIBBASE)
43 InitSemaphore(&LIBBASE->lsd.sema);
45 #if BUFFERED_VRAM
46 InitSemaphore(&LIBBASE->lsd.framebufferlock);
47 #endif
49 if (!OOP_ObtainAttrBases(abd))
50 return FALSE;
51 kprintf("OBTAINED ATTRBASES\n");
53 LIBBASE->lsd.input_task = init_linuxinput_task(&LIBBASE->lsd);
54 if (NULL == LIBBASE->lsd.input_task)
55 return FALSE;
56 kprintf("GOT INPUT TASK\n");
58 return TRUE;
61 static int Expunge_Hidd(LIBBASETYPEPTR LIBBASE)
63 OOP_ReleaseAttrBases(abd);
65 if (NULL != LIBBASE->lsd.input_task)
66 kill_linuxinput_task(&LIBBASE->lsd);
68 return TRUE;
71 ADD2INITLIB(Init_Hidd, 1)
72 ADD2EXPUNGELIB(Expunge_Hidd, 1)