2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
5 Desc: Regina code for initialization during opening and closing of the library
8 #include <exec/types.h>
9 #include <exec/memory.h>
10 #include <aros/libcall.h>
11 #include <aros/debug.h>
12 #include <proto/exec.h>
13 #include <proto/alib.h>
18 #include <aros/symbolsets.h>
19 #include LC_LIBDEFS_FILE
21 struct DosLibrary
* DOSBase
;
22 struct Library
* aroscbase
;
23 struct MinList
*__regina_tsdlist
= NULL
;
26 static int InitLib(LIBBASETYPEPTR LIBBASE
)
28 D(bug("Inside Init func of regina.library\n"));
30 if (!(DOSBase
= (struct DosLibrary
*)OpenLibrary("dos.library",0))) return FALSE
;
32 if (!(aroscbase
= OpenLibrary("arosc.library",41)))
34 CloseLibrary((struct Library
*)DOSBase
);
38 __regina_semaphorepool
= CreatePool(MEMF_PUBLIC
, 1024, 256);
40 __regina_tsdlist
= (struct MinList
*)AllocPooled (__regina_semaphorepool
, sizeof(struct MinList
));
41 NewList((struct List
*)__regina_tsdlist
);
46 static int ExpungeLib(LIBBASETYPEPTR LIBBASE
)
48 D(bug("Inside Expunge func of regina.library\n"));
50 DeletePool(__regina_semaphorepool
);
51 CloseLibrary(aroscbase
);
52 CloseLibrary((struct Library
*)DOSBase
);
57 ADD2INITLIB(InitLib
, 0);
58 ADD2EXPUNGELIB(ExpungeLib
, 0);