/* Get the Current Thread */
Thread = CONTAINING_RECORD(CurrentEntry, ETHREAD, ThreadListEntry);
+ /* Move to the Next Thread */
+ CurrentEntry = CurrentEntry->Flink;
+
/* Make sure it's not the one we're in */
if (Thread != CurrentThread) {
KeForceResumeThread(&Thread->Tcb);
}
}
-
- /* Move to the Next Thread */
- CurrentEntry = CurrentEntry->Flink;
}
}
return(Status);
}
+ PsLockProcess(Process, FALSE);
+
if(Process->ExitTime.QuadPart) {
DPRINT1("Process has an exit time!\n");
/* Save the Exit Time */
KeQuerySystemTime(&Process->ExitTime);
+
+ PsUnlockProcess(Process);
/* Only master thread remains... kill it off */
if (PsGetCurrentThread()->ThreadsProcess == Process) {