X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Tools%2Fnativelib%2Finclude%2Facess.h;fp=Tools%2Fnativelib%2Finclude%2Facess.h;h=f133788d55481e30379c2760d2b87094650db436;hb=50a98c40481c6d1df267f4631228e9a4d107fe74;hp=b8bd4df29fa84703e63b587dc64bc487363d8b5b;hpb=7b64f5e7f00e445a5637e9e3289a1332a14d28e5;p=tpg%2Facess2.git diff --git a/Tools/nativelib/include/acess.h b/Tools/nativelib/include/acess.h index b8bd4df2..f133788d 100644 --- a/Tools/nativelib/include/acess.h +++ b/Tools/nativelib/include/acess.h @@ -13,8 +13,6 @@ #define STR(x) #x #define EXPAND_STR(x) STR(x) -#define ASSERT(x) do{}while(0) - extern char __buildnum[]; #define BUILD_NUM ((int)(Uint)&__buildnum) extern const char gsGitHash[]; @@ -25,6 +23,7 @@ extern const char gsBuildInfo[]; #define BITS 32 #define NULL ((void*)0) #include +#include typedef uintptr_t Uint; //typedef unsigned int size_t; @@ -49,6 +48,7 @@ typedef uint32_t tPAddr; typedef uint32_t tUID; typedef uint32_t tGID; typedef uint32_t tTID; +typedef uint32_t tPGID; typedef int64_t tTime; extern tTime now(void); @@ -71,7 +71,27 @@ extern void free(void *buffer); extern char *strdup(const char *str); #include -#include +//#include +#include + +extern void Debug_TraceEnter(const char *Function, const char *Format, ...); +extern void Debug_TraceLog(const char *Function, const char *Format, ...); +extern void Debug_TraceLeave(const char *Function, char Type, ...); +#undef ENTER +#undef LOG +#undef LEAVE +#undef LEAVE_RET +#if DEBUG +# define ENTER(str, v...) Debug_TraceEnter(__func__, str, ##v) +# define LOG(fmt, v...) Debug_TraceLog(__func__, fmt, ##v) +# define LEAVE(t, v...) Debug_TraceLeave(__func__, t, ##v) +# define LEAVE_RET(t,v) do{LEAVE('-');return v;}while(0) +#else +# define ENTER(...) do{}while(0) +# define LOG(...) do{}while(0) +# define LEAVE(...) do{}while(0) +# define LEAVE_RET(t,v) do{return v;}while(0) +#endif // Threads extern void **Threads_GetHandlesPtr(void);