Kernel/x86 - acpica: Debug to trace AE_NO_MEMORY cause
[tpg/acess2.git] / KernelLand / Kernel / debug.c
index cb11f5f..49600c2 100644 (file)
@@ -11,6 +11,8 @@
 
 // === IMPORTS ===
 extern void    Threads_Dump(void);
+extern void    Heap_Dump(void)
+               ;
 extern void    KernelPanic_SetMode(void);
 extern void    KernelPanic_PutChar(char Ch);
 extern void    IPStack_SendDebugText(const char *Text);
@@ -22,6 +24,7 @@ void  Debug_DbgOnlyFmt(const char *format, va_list args);
 void   Debug_FmtS(int bUseKTerm, const char *format, ...);
 void   Debug_Fmt(int bUseKTerm, const char *format, va_list args);
 void   Debug_SetKTerminal(const char *File);
+void   LogFV(const char *Fmt, va_list args);
 
 // === GLOBALS ===
  int   gDebug_Level = 0;
@@ -150,7 +153,7 @@ void Debug(const char *Fmt, ...)
        va_list args;
        
        #if LOCK_DEBUG_OUTPUT
-       SHORTLOCK(&glDebug_Lock);
+       if(!CPU_HAS_LOCK(&glDebug_Lock)) SHORTLOCK(&glDebug_Lock);
        #endif
 
        Debug_Puts(0, "Debug: ");
@@ -228,7 +231,8 @@ void Panic(const char *Fmt, ...)
        va_list args;
        
        #if LOCK_DEBUG_OUTPUT
-       SHORTLOCK(&glDebug_Lock);
+       if( !CPU_HAS_LOCK(&glDebug_Lock) )
+               SHORTLOCK(&glDebug_Lock);
        #endif
        // And never SHORTREL
        

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