Halfway through deciding where to put the error handlers, I've settled on libc
[tpg/acess2.git] / Usermode / Libraries / ld-acess.so_src / common.h
index bc2efbd..81913d5 100644 (file)
 \r
 #include <stdarg.h>\r
 \r
+// === CONSTANTS ===\r
+#define        MAX_LOADED_LIBRARIES    64\r
+#define        MAX_STRINGS_BYTES       4096\r
+#define        SYSTEM_LIB_DIR  "/Acess/Libs/"\r
+\r
 // === Types ===\r
 typedef unsigned int   Uint;\r
 typedef unsigned char  Uint8;\r
@@ -19,6 +24,14 @@ typedef unsigned long        Uint32;
 typedef signed char            Sint8;\r
 typedef signed short   Sint16;\r
 typedef signed long            Sint32;\r
+\r
+typedef struct {\r
+       Uint    Base;\r
+       char    *Name;\r
+}      tLoadedLib;\r
+\r
+// === GLOBALS ===\r
+extern tLoadedLib      gLoadedLibraries[MAX_LOADED_LIBRARIES];\r
 
 // === Main ===
 extern int     DoRelocate( Uint base, char **envp, char *Filename );
@@ -42,6 +55,7 @@ extern void   SysDebug(char *fmt, ...);       //!< Now implemented in main.c
 extern void    SysDebugV(char *fmt, ...);\r
 extern Uint    SysLoadBin(char *path, Uint *entry);\r
 extern Uint    SysUnloadBin(Uint Base);\r
+extern void    SysSetFaultHandler(int (*Hanlder)(int));\r
 extern int     open(char *filename, int flags);\r
 extern void    close(int fd);\r
 

UCC git Repository :: git.ucc.asn.au