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));
} while ((NextEntry != NULL) && (NextEntry != (PVOID)1));
/* Remove magic value, keep looping if it got changed */
- } while (InterlockedCompareExchangePointer(&PspReaperListHead.Flink,
+ } while (InterlockedCompareExchangePointer((PVOID*)&PspReaperListHead.Flink,
0,
(PVOID)1) != (PVOID)1);
}
#if DBG
VOID
NTAPI
-PspCheckProcessList()
+PspCheckProcessList(VOID)
{
PLIST_ENTRY Entry;
* port, which means that it died before being fully created. Since we
* still have to notify an LPC Server, we'll use the exception port,
* which we know exists. However, we need to know how far the thread
- * actually got created. We have three possibilites:
+ * actually got created. We have three possibilities:
*
* - NtCreateThread returned an error really early: DeadThread is set.
* - NtCreateThread managed to create the thread: DeadThread is off.
- * - NtCreateThread was creating the thread (with Deadthread set,
+ * - NtCreateThread was creating the thread (with DeadThread set,
* but the thread got killed prematurely: STATUS_THREAD_IS_TERMINATING
* is our exit code.)
*
*/
/* Setup the message header */
+ TerminationMsg.h.u2.ZeroInit = 0;
TerminationMsg.h.u2.s2.Type = LPC_CLIENT_DIED;
TerminationMsg.h.u1.s1.TotalLength = sizeof(TerminationMsg);
TerminationMsg.h.u1.s1.DataLength = sizeof(TerminationMsg) -
if (Apc->SystemArgument2)
{
/* Free the APC */
- Status = (NTSTATUS)Apc->NormalContext;
+ Status = PtrToUlong(Apc->NormalContext);
PspExitApcRundown(Apc);
/* Terminate the Thread */
PspExitApcRundown,
PspExitNormalApc,
KernelMode,
- (PVOID)ExitStatus);
+ UlongToPtr(ExitStatus));
/* Insert it into the APC Queue */
if (!KeInsertQueueApc(Apc, Apc, NULL, 2))
NTAPI
PspIsProcessExiting(IN PEPROCESS Process)
{
- return Process->Flags & PSF_PROCESS_EXITING_BIT;
+ return Process->Flags & PSF_PROCESS_EXITING_BIT;
}
VOID
if (!ExAcquireRundownProtection(&Process->RundownProtect))
{
/* Failed to lock, fail */
- ObDereferenceObject (Process);
+ ObDereferenceObject(Process);
return STATUS_PROCESS_IS_TERMINATING;
}
}
/* Dereference and Fail */
- ObDereferenceObject(TerminationPort);
+ ObDereferenceObject(TerminationLpcPort);
return STATUS_INSUFFICIENT_RESOURCES;
}