Cleanup (debug statements removed)
authorJohn Hodge <[email protected]>
Sun, 13 Feb 2011 04:25:43 +0000 (12:25 +0800)
committerJohn Hodge <[email protected]>
Sun, 13 Feb 2011 04:25:43 +0000 (12:25 +0800)
Kernel/arch/x86/lib.c
Kernel/arch/x86/start.asm
Kernel/time.c

index b73cc6a..3d951d4 100644 (file)
@@ -8,7 +8,7 @@
 #define TRACE_LOCKS    0
 
 #if TRACE_LOCKS
-struct sShortSpinlock  glDebug_Lock;
+extern struct sShortSpinlock   glDebug_Lock;
 #endif
 
 extern int     GetCPUNum(void);
index 0a4f920..737ff2e 100644 (file)
@@ -118,8 +118,8 @@ APStartup:
        mov ds, ax
        lgdt [DWORD ds:lGDTPtr-KERNEL_BASE-0xFFFF0]
        mov eax, cr0
-       or      al, 1
-       mov     cr0, eax
+       or al, 1
+       mov cr0, eax
        jmp 08h:DWORD .ProtectedMode-KERNEL_BASE
 [bits 32]
 .ProtectedMode:
@@ -134,7 +134,7 @@ APStartup:
        mov eax, gaInitPageDir - KERNEL_BASE
        mov cr3, eax
        mov eax, cr0
-       or      eax, 0x80010000 ; PG and WP
+       or eax, 0x80010000      ; PG and WP
        mov cr0, eax
        ; Jump to higher half
        lea eax, [.higherHalf]
index 9ddf26a..e64d0b7 100644 (file)
@@ -21,9 +21,9 @@ Sint64        now(void);
 void   Timer_CallTimers(void);
 
 // === GLOBALS ===
-Uint64 giTicks = 0;
-Sint64 giTimestamp = 0;
-Uint64 giPartMiliseconds = 0;
+volatile Uint64        giTicks = 0;
+volatile Sint64        giTimestamp = 0;
+volatile Uint64        giPartMiliseconds = 0;
 tTimer gTimers[NUM_TIMERS];    // TODO: Replace by a ring-list timer
 
 // === CODE ===
@@ -86,7 +86,9 @@ void Time_RemoveTimer(int ID)
 void Time_Delay(int Delay)
 {
        Sint64  dest = giTimestamp + Delay;
+       //Log("Time_Delay: dest = %lli", dest);
        while(dest > giTimestamp)       Threads_Yield();
+       //Log("Time_Delay: giTimestamp = %lli", giTimestamp);
 }
 
 // === EXPORTS ===

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