Author: tkreuzer Date: Wed Mar 18 20:03:58 2009 New Revision: 40089
URL: http://svn.reactos.org/svn/reactos?rev=40089&view=rev Log: Merge from amd64 branch: 34750 Add ExpChangePushlock macro for _WIN64 (Timo Kreuzer) 34941 Fix usage of InterlockedExchangeAddSizeT (Timo Kreuzer)
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/e... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] Wed Mar 18 20:03:58 2009 @@ -121,6 +121,7 @@
#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 @@ 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);