Commit in reactos on MAIN
include/ddk/exfuncs.h+17-21.43 -> 1.44
ntoskrnl/ps/kill.c+3-81.88 -> 1.89
+20-10
2 modified files
Added InterlockedCompareExchangePointer macro and 64 bit versions for Interlocked[Compare]ExchangePointer macros for use in ntoskrnl.

reactos/include/ddk
exfuncs.h 1.43 -> 1.44
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
kill.c 1.88 -> 1.89
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);
  
CVSspam 0.2.8