Kernel/x86 - Fixed timing error that caused time to increment at 2x real speed
[tpg/acess2.git] / Kernel / arch / x86 / lib.c
index 5a86e44..0471deb 100644 (file)
@@ -79,12 +79,13 @@ void SHORTLOCK(struct sShortSpinlock *Lock)
        }
        #endif
        
+       __ASM__("cli");
+       
        // Wait for another CPU to release
        while(v) {
                __ASM__("xchgl %%eax, (%%edi)":"=a"(v):"a"(cpu),"D"(&Lock->Lock));
        }
        
-       __ASM__("cli");
        Lock->IF = IF;
        
        #if TRACE_LOCKS

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