mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
Merge from amd64 branch:
34750 Add ExpChangePushlock macro for _WIN64 (Timo Kreuzer) 34941 Fix usage of InterlockedExchangeAddSizeT (Timo Kreuzer) svn path=/trunk/; revision=40089
This commit is contained in:
parent
6c4ccad5b0
commit
5e3ee25bd3
1 changed files with 3 additions and 2 deletions
|
@ -121,6 +121,7 @@ typedef struct
|
|||
|
||||
#ifdef _WIN64
|
||||
#define ExpChangeRundown(x, y, z) InterlockedCompareExchange64((PLONGLONG)x, y, z)
|
||||
#define ExpChangePushlock(x, y, z) InterlockedCompareExchangePointer((PVOID*)x, (PVOID)y, (PVOID)z)
|
||||
#define ExpSetRundown(x, y) InterlockedExchange64((PLONGLONG)x, y)
|
||||
#else
|
||||
#define ExpChangeRundown(x, y, z) PtrToUlong(InterlockedCompareExchange((PLONG)x, PtrToLong(y), PtrToLong(z)))
|
||||
|
@ -1142,8 +1143,8 @@ ExReleasePushLockExclusive(PEX_PUSH_LOCK PushLock)
|
|||
ASSERT(PushLock->Waiting || PushLock->Shared == 0);
|
||||
|
||||
/* Unlock the pushlock */
|
||||
OldValue.Value = InterlockedExchangeAddSizeT((PLONG)PushLock,
|
||||
-(LONG)EX_PUSH_LOCK_LOCK);
|
||||
OldValue.Value = InterlockedExchangeAddSizeT((PSIZE_T)PushLock,
|
||||
-(SIZE_T)EX_PUSH_LOCK_LOCK);
|
||||
|
||||
/* Sanity checks */
|
||||
ASSERT(OldValue.Locked);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue