Author: tkreuzer Date: Tue Aug 19 14:56:28 2008 New Revision: 35461
URL: http://svn.reactos.org/svn/reactos?rev=35461&view=rev Log: - fix usage of InterlockedExchangePointer - fix ULONG -> pointer cast
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ps/kill.c
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ps/kill.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntoskr... ============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ps/kill.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ps/kill.c [iso-8859-1] Tue Aug 19 14:56:28 2008 @@ -177,7 +177,7 @@ do { /* Write magic value and return the next entry to process */ - NextEntry = InterlockedExchangePointer(&PspReaperListHead.Flink, + NextEntry = InterlockedExchangePointer((PVOID*)&PspReaperListHead.Flink, (PVOID)1); ASSERT((NextEntry != NULL) && (NextEntry != (PVOID)1));
@@ -200,9 +200,9 @@ } while ((NextEntry != NULL) && (NextEntry != (PVOID)1));
/* Remove magic value, keep looping if it got changed */ - } while (InterlockedCompareExchangePointer(&PspReaperListHead.Flink, - 0, - 1) != (PVOID)1); + } while (InterlockedCompareExchangePointer((PVOID*)&PspReaperListHead.Flink, + (PVOID)0, + (PVOID)1) != (PVOID)1); }
VOID @@ -403,7 +403,7 @@ PEPROCESS CurrentProcess; PETHREAD Thread, OtherThread, PreviousThread = NULL; PVOID DeallocationStack; - ULONG Dummy; + ULONG_PTR Dummy; BOOLEAN Last = FALSE; PTERMINATION_PORT TerminationPort, NextPort; PLIST_ENTRY FirstEntry, CurrentEntry; @@ -880,7 +880,7 @@ if (Apc->SystemArgument2) { /* Free the APC */ - Status = (NTSTATUS)Apc->NormalContext; + Status = (NTSTATUS)(ULONG_PTR)Apc->NormalContext; PspExitApcRundown(Apc);
/* Terminate the Thread */ @@ -985,7 +985,7 @@ PspExitApcRundown, PspExitNormalApc, KernelMode, - (PVOID)ExitStatus); + (PVOID)(ULONG_PTR)ExitStatus);
/* Insert it into the APC Queue */ if (!KeInsertQueueApc(Apc, Apc, NULL, 2))