DiskTool - Compiling again, now with modules
[tpg/acess2.git] / Tools / DiskTool / src / include / acess.h
index ec319f2..deb1834 100644 (file)
@@ -79,12 +79,23 @@ extern tGID Threads_GetGID(void);
 #define errno  (*(Threads_GetErrno()))
 
 #include <string.h>
-
-
-#define ENTER(...)     do{}while(0)
-#define LOG(...)       do{}while(0)
-#define LEAVE(...)     do{}while(0)
-#define LEAVE_RET(t,v) return v;
+extern int     strpos(const char *Str, char Ch);
+extern void    itoa(char *buf, uint64_t num, int base, int minLength, char pad);
+
+// TODO: Move out?
+extern int64_t DivUp(int64_t value, int64_t divisor);
+
+#if DEBUG
+# define ENTER(str, v...)      Log("%s:%i: ENTER "str, __func__, __LINE__)
+# define LOG(fmt, v...)        Log("%s:%i: "fmt, __func__, __LINE__, ##v)
+# define LEAVE(...)    do{}while(0)
+# define LEAVE_RET(t,v)        return v;
+#else
+# define ENTER(...)    do{}while(0)
+# define LOG(...)      do{}while(0)
+# define LEAVE(...)    do{}while(0)
+# define LEAVE_RET(t,v)        return v;
+#endif
 
 static inline int Mutex_Acquire(tMutex *m) {
        if(*m)  Log_KernelPanic("---", "Double mutex lock");

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