X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=lib%2Frtl%2Fsrw.c;h=3c37a83b4333685511184788c97fe370835ed52d;hp=d41e154a60dc206a8dd768358ea342b9a61f64cd;hb=45a06d507a1bad180e2ff8e90535e99915b3a94b;hpb=0b8509a565f5f63301defa0f913e63a3d4957e7c diff --git a/lib/rtl/srw.c b/lib/rtl/srw.c index d41e154a60d..3c37a83b433 100644 --- a/lib/rtl/srw.c +++ b/lib/rtl/srw.c @@ -131,7 +131,7 @@ RtlpReleaseWaitBlockLockExclusive(IN OUT PRTL_SRWLOCK SRWLock, } } - (void)_InterlockedExchange((PLONG)&SRWLock->Ptr, NewValue); + (void)InterlockedExchange((PLONG)&SRWLock->Ptr, NewValue); if (FirstWaitBlock->Exclusive) { @@ -186,7 +186,7 @@ RtlpReleaseWaitBlockLockLastShared(IN OUT PRTL_SRWLOCK SRWLock, NewValue = RTL_SRWLOCK_OWNED; } - (void)_InterlockedExchange((PLONG)&SRWLock->Ptr, NewValue); + (void)InterlockedExchange((PLONG)&SRWLock->Ptr, NewValue); (void)InterlockedOr(&FirstWaitBlock->Wake, TRUE); @@ -420,7 +420,7 @@ RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) NewValue = (CurrentValue >> RTL_SRWLOCK_BITS) + 1; NewValue = (NewValue << RTL_SRWLOCK_BITS) | (CurrentValue & RTL_SRWLOCK_MASK); - if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + if (InterlockedCompareExchange((PLONG)&SRWLock->Ptr, NewValue, CurrentValue) == CurrentValue) { @@ -499,7 +499,7 @@ RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) ASSERT_SRW_WAITBLOCK(&StackWaitBlock); NewValue = (ULONG_PTR)&StackWaitBlock | RTL_SRWLOCK_OWNED | RTL_SRWLOCK_CONTENDED; - if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + if (InterlockedCompareExchange((PLONG)&SRWLock->Ptr, NewValue, CurrentValue) == CurrentValue) { @@ -521,7 +521,7 @@ RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) RTL_SRWLOCK_SHARED nor the RTL_SRWLOCK_OWNED bit is set */ ASSERT(!(CurrentValue & RTL_SRWLOCK_CONTENDED)); - if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + if (InterlockedCompareExchange((PLONG)&SRWLock->Ptr, NewValue, CurrentValue) == CurrentValue) { @@ -580,7 +580,7 @@ RtlReleaseSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) NewValue = (NewValue << RTL_SRWLOCK_BITS) | RTL_SRWLOCK_SHARED | RTL_SRWLOCK_OWNED; } - if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + if (InterlockedCompareExchange((PLONG)&SRWLock->Ptr, NewValue, CurrentValue) == CurrentValue) { @@ -639,7 +639,7 @@ RtlAcquireSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock) NewValue = (ULONG_PTR)&StackWaitBlock | RTL_SRWLOCK_SHARED | RTL_SRWLOCK_CONTENDED | RTL_SRWLOCK_OWNED; - if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + if (InterlockedCompareExchange((PLONG)&SRWLock->Ptr, NewValue, CurrentValue) == CurrentValue) { @@ -697,7 +697,7 @@ AddWaitBlock: ASSERT_SRW_WAITBLOCK(&StackWaitBlock); NewValue = (ULONG_PTR)&StackWaitBlock | RTL_SRWLOCK_OWNED | RTL_SRWLOCK_CONTENDED; - if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + if (InterlockedCompareExchange((PLONG)&SRWLock->Ptr, NewValue, CurrentValue) == CurrentValue) { @@ -767,7 +767,7 @@ RtlReleaseSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock) ASSERT(!(CurrentValue & ~RTL_SRWLOCK_OWNED)); NewValue = 0; - if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + if (InterlockedCompareExchange((PLONG)&SRWLock->Ptr, NewValue, CurrentValue) == CurrentValue) {