AcessKernel - cleaning up debug messages
authorJohn Hodge <[email protected]>
Sun, 7 Oct 2012 11:23:33 +0000 (19:23 +0800)
committerJohn Hodge <[email protected]>
Sun, 7 Oct 2012 11:23:33 +0000 (19:23 +0800)
AcessNative/acesskernel_src/server.c
AcessNative/acesskernel_src/syscalls.c
AcessNative/acesskernel_src/threads.c
AcessNative/ld-acess_src/exports.c
AcessNative/ld-acess_src/syscalls.c

index 5ee6967..0930fd5 100644 (file)
@@ -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) )
                {
index 86c6d71..6919239 100644 (file)
@@ -8,6 +8,9 @@
 #include <acess.h>
 #include <threads.h>
 #include <events.h>
+#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 ++ )
index 9400d72..ecc9f33 100644 (file)
@@ -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 );
index 47f741f..7e13134 100644 (file)
@@ -11,7 +11,7 @@
 #include <stdarg.h>
 #include <stddef.h>
 
-#define DEBUG(v...)    Debug(v)
+#define DEBUG(v...)    do{}while(0)//Debug(v)
 #define PAGE_SIZE      4096
 
 typedef struct sFILE   FILE;
index 5c26870..3fdbc72 100644 (file)
 #include <unistd.h>
 #include "request.h"
 
+#if SYSCALL_TRACE
 #define DEBUG(str, x...)       Debug(str, x)
+#else
+#define DEBUG(...)     do{}while(0)
+#endif
 
 #define        MAX_FPS 16
 

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