reactos/include/ddk
diff -u -r1.43 -r1.44
--- exfuncs.h 18 Oct 2004 20:56:21 -0000 1.43
+++ exfuncs.h 4 Dec 2004 16:56:20 -0000 1.44
@@ -991,8 +991,23 @@
);
#ifndef InterlockedExchangePointer
-#define InterlockedExchangePointer(__T__, __V__) \
- (PVOID)InterlockedExchange((PLONG)(__T__), (LONG)(__V__))
+# ifdef _WIN64
+# define InterlockedExchangePointer(__T__, __V__) \
+ (PVOID)InterlockedExchange64((PLONGLONG)(__T__), (LONGLONG)(__V__))
+# else
+# define InterlockedExchangePointer(__T__, __V__) \
+ (PVOID)InterlockedExchange((PLONG)(__T__), (LONG)(__V__))
+# endif
+#endif
+
+#ifndef InterlockedCompareExchangePointer
+# ifdef _WIN64
+# define InterlockedCompareExchangePointer(__T__, __V__, __C__) \
+ (PVOID)InterlockedCompareExchange64((PLONGLONG)(__T__), (LONGLONG)(__V__), (LONGLONG)(__C__))
+# else
+# define InterlockedCompareExchangePointer(__T__, __V__, __C__) \
+ (PVOID)InterlockedCompareExchange((PLONG)(__T__), (LONG)(__V__), (LONG)(__C__))
+# endif
#endif
/*---*/
reactos/ntoskrnl/ps
diff -u -r1.88 -r1.89
--- kill.c 4 Dec 2004 15:49:20 -0000 1.88
+++ kill.c 4 Dec 2004 16:56:20 -0000 1.89
@@ -1,4 +1,4 @@
-/* $Id: kill.c,v 1.88 2004/12/04 15:49:20 blight Exp $
+/* $Id: kill.c,v 1.89 2004/12/04 16:56:20 blight Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -142,13 +142,8 @@
/* If the ProcessoR Control Block's NpxThread points to the current thread
* unset it.
*/
-#ifdef _WIN64
- InterlockedCompareExchange64((LONGLONG *)&KeGetCurrentKPCR()->PrcbData.NpxThread,
- (LONGLONG)NULL, (LONGLONG)ETHREAD_TO_KTHREAD(CurrentThread));
-#else
- InterlockedCompareExchange((LONG *)&KeGetCurrentKPCR()->PrcbData.NpxThread,
- (LONG)NULL, (LONG)ETHREAD_TO_KTHREAD(CurrentThread));
-#endif
+ InterlockedCompareExchangePointer(&KeGetCurrentKPCR()->PrcbData.NpxThread,
+ NULL, ETHREAD_TO_KTHREAD(CurrentThread));
KeReleaseSpinLock(&PiThreadLock, oldIrql);