From: John Hodge Date: Sun, 13 Feb 2011 04:25:43 +0000 (+0800) Subject: Cleanup (debug statements removed) X-Git-Tag: rel0.07~7 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=310d4fe3f4d96ef804a27463bc43df9acb28757a;p=tpg%2Facess2.git Cleanup (debug statements removed) --- diff --git a/Kernel/arch/x86/lib.c b/Kernel/arch/x86/lib.c index b73cc6a2..3d951d46 100644 --- a/Kernel/arch/x86/lib.c +++ b/Kernel/arch/x86/lib.c @@ -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); diff --git a/Kernel/arch/x86/start.asm b/Kernel/arch/x86/start.asm index 0a4f920e..737ff2e7 100644 --- a/Kernel/arch/x86/start.asm +++ b/Kernel/arch/x86/start.asm @@ -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] diff --git a/Kernel/time.c b/Kernel/time.c index 9ddf26a3..e64d0b77 100644 --- a/Kernel/time.c +++ b/Kernel/time.c @@ -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 ===