From: John Hodge Date: Wed, 7 Dec 2011 11:30:05 +0000 (+0800) Subject: Kernel/x86 - Fixing build X-Git-Tag: rel0.14~31 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=401212ac94c1e39484478e8c88f7e5470cbc45ad;p=tpg%2Facess2.git Kernel/x86 - Fixing build --- diff --git a/Kernel/arch/x86/lib.c b/Kernel/arch/x86/lib.c index 0471deba..3858eff3 100644 --- a/Kernel/arch/x86/lib.c +++ b/Kernel/arch/x86/lib.c @@ -82,9 +82,12 @@ void SHORTLOCK(struct sShortSpinlock *Lock) __ASM__("cli"); // Wait for another CPU to release - while(v) { - __ASM__("xchgl %%eax, (%%edi)":"=a"(v):"a"(cpu),"D"(&Lock->Lock)); - } + __ASM__( + "1: lock cmpxchgl %2, (%3)\n\t" + "jnz 1b" + : "=a"(v) + : "a"(0), "r"(cpu), "r"(&Lock->Lock) + ); Lock->IF = IF; diff --git a/Kernel/arch/x86/proc.c b/Kernel/arch/x86/proc.c index 9e8aa385..1cd11067 100644 --- a/Kernel/arch/x86/proc.c +++ b/Kernel/arch/x86/proc.c @@ -488,7 +488,7 @@ void Proc_Start(void) #else // Create Idle Task tid = Proc_NewKThread(Proc_IdleThread, &gaCPUs[0]); - gaCPUs[0].IdleThread = Threads_GetThread(tid); +// gaCPUs[0].IdleThread = Threads_GetThread(tid); // Set current task gaCPUs[0].Current = &gThreadZero;