From: John Hodge Date: Sun, 7 Oct 2012 11:23:33 +0000 (+0800) Subject: AcessKernel - cleaning up debug messages X-Git-Tag: rel0.15~690 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=9d234f984c149fcc6b1f5aab21a0ca227c060e32;p=tpg%2Facess2.git AcessKernel - cleaning up debug messages --- diff --git a/AcessNative/acesskernel_src/server.c b/AcessNative/acesskernel_src/server.c index 5ee6967c..0930fd58 100644 --- a/AcessNative/acesskernel_src/server.c +++ b/AcessNative/acesskernel_src/server.c @@ -152,7 +152,7 @@ int Server_WorkerThread(void *ClientPtr) perror("select"); continue ; } - Log_Debug("Server", "%p: rv=%i", Client, rv); +// Log_Debug("Server", "%p: rv=%i", Client, rv); if( FD_ISSET(Client->Socket, &fds) ) { diff --git a/AcessNative/acesskernel_src/syscalls.c b/AcessNative/acesskernel_src/syscalls.c index 86c6d717..69192399 100644 --- a/AcessNative/acesskernel_src/syscalls.c +++ b/AcessNative/acesskernel_src/syscalls.c @@ -8,6 +8,9 @@ #include #include #include +#if DEBUG == 0 +# define DONT_INCLUDE_SYSCALL_NAMES +#endif #include "../syscalls.h" // === IMPORTS === @@ -399,7 +402,7 @@ tRequestHeader *SyscallRecieve(tRequestHeader *Request, int *ReturnLength) *(Uint64*)inData = retVal; inData += sizeof(Uint64); - Log_Debug("Syscalls", "Return 0x%llx", retVal); + //Log_Debug("Syscalls", "Return 0x%llx", retVal); retValueCount = 1; for( i = 0; i < Request->NParams; i ++ ) diff --git a/AcessNative/acesskernel_src/threads.c b/AcessNative/acesskernel_src/threads.c index 9400d72d..ecc9f331 100644 --- a/AcessNative/acesskernel_src/threads.c +++ b/AcessNative/acesskernel_src/threads.c @@ -312,7 +312,7 @@ Uint32 Threads_WaitEvents(Uint32 Mask) { Uint32 rv; - Log_Debug("Threads", "Mask = %x, ->Events = %x", Mask, gpCurrentThread->Events); + //Log_Debug("Threads", "Mask = %x, ->Events = %x", Mask, gpCurrentThread->Events); gpCurrentThread->WaitMask = Mask; if( !(gpCurrentThread->Events & Mask) ) @@ -321,13 +321,13 @@ Uint32 Threads_WaitEvents(Uint32 Mask) Log_Warning("Threads", "Wait on eventsem of %p, %p failed", gpCurrentThread, gpCurrentThread->EventSem); } - Log_Debug("Threads", "Woken from nap (%i here)", SDL_SemValue(gpCurrentThread->EventSem)); + //Log_Debug("Threads", "Woken from nap (%i here)", SDL_SemValue(gpCurrentThread->EventSem)); } rv = gpCurrentThread->Events & Mask; gpCurrentThread->Events &= ~Mask; gpCurrentThread->WaitMask = -1; - Log_Debug("Threads", "- rv = %x", rv); + //Log_Debug("Threads", "- rv = %x", rv); return rv; } @@ -335,7 +335,7 @@ Uint32 Threads_WaitEvents(Uint32 Mask) void Threads_PostEvent(tThread *Thread, Uint32 Events) { Thread->Events |= Events; - Log_Debug("Threads", "Trigger event %x (->Events = %p)", Events, Thread->Events); + Log_Debug("Threads", "Trigger event %x (->Events = %p) on %p", Events, Thread->Events, Thread); if( Events == 0 || Thread->WaitMask & Events ) { Threads_Glue_SemSignal( Thread->EventSem, 1 ); diff --git a/AcessNative/ld-acess_src/exports.c b/AcessNative/ld-acess_src/exports.c index 47f741f1..7e13134b 100644 --- a/AcessNative/ld-acess_src/exports.c +++ b/AcessNative/ld-acess_src/exports.c @@ -11,7 +11,7 @@ #include #include -#define DEBUG(v...) Debug(v) +#define DEBUG(v...) do{}while(0)//Debug(v) #define PAGE_SIZE 4096 typedef struct sFILE FILE; diff --git a/AcessNative/ld-acess_src/syscalls.c b/AcessNative/ld-acess_src/syscalls.c index 5c268702..3fdbc729 100644 --- a/AcessNative/ld-acess_src/syscalls.c +++ b/AcessNative/ld-acess_src/syscalls.c @@ -11,7 +11,11 @@ #include #include "request.h" +#if SYSCALL_TRACE #define DEBUG(str, x...) Debug(str, x) +#else +#define DEBUG(...) do{}while(0) +#endif #define MAX_FPS 16