X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fex%2Fi386%2Ffastinterlck_asm.S;h=d931302dc93241628863902b66118dda5454c145;hp=89cc8786e39e234cb8cb5cf116f45446a895f0aa;hb=68a391140eaca23e7e6e417ad4a1a207a64de2f1;hpb=cadc0d6ee97dd48f18f195ad668c6169efc1773f diff --git a/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S b/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S index 89cc8786e39..d931302dc93 100644 --- a/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S +++ b/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S @@ -8,28 +8,9 @@ /* INCLUDES ******************************************************************/ #include +#include .intel_syntax noprefix -//#define CONFIG_SMP - -#ifdef CONFIG_SMP -#define LOCK lock -#define ACQUIRE_SPINLOCK(x, y) \ - lock bts dword ptr [x], 0; \ - jb y -#define RELEASE_SPINLOCK(x) mov byte ptr [x], 0 -#define SPIN_ON_LOCK(x, y) \ -1: \ - test dword ptr [x], 1; \ - jz y; \ - pause; \ - jmp 1b -#else -#define LOCK -#define ACQUIRE_SPINLOCK(x, y) -#define RELEASE_SPINLOCK(x) -#endif - /* FUNCTIONS ****************************************************************/ /* @@ -424,7 +405,7 @@ /* Get next pointer and do the exchange */ mov ebx, [eax] - LOCK cmpxchg8b qword ptr [ebp] + LOCK cmpxchg8b [ebp] jnz 1b /* Restore registers and return */ @@ -468,7 +449,7 @@ lea ecx, [edx+0x10001] /* Do the exchange */ - LOCK cmpxchg8b qword ptr [ebp] + LOCK cmpxchg8b [ebp] jnz 1b /* Restore registers and return */ @@ -508,7 +489,7 @@ mov cx, bx /* Do the exchange */ - LOCK cmpxchg8b qword ptr [ebp] + LOCK cmpxchg8b [ebp] jnz 1b /* Restore registers and return */ @@ -630,7 +611,7 @@ @ExfInterlockedCompareExchange64@12: /* Save registers */ - push ebp + push ebx push ebp /* Get desination pointer, exchange value and comperand value/address */ @@ -642,7 +623,7 @@ mov edx, [edx+4] /* Do the op */ - LOCK cmpxchg8b qword ptr [ebp] + LOCK cmpxchg8b [ebp] /* Restore volatiles */ pop ebp @@ -674,7 +655,7 @@ mov edx, [edx+4] /* Do the op */ - LOCK cmpxchg8b qword ptr [ebp] + LOCK cmpxchg8b [ebp] /* Restore volatiles */ pop ebp