Definition at line 651 of file apc.c.
Referenced by ExSwapinWorkerThreads(), IofCompleteRequest(), IopCompleteRequest(), IoRaiseHardError(), KeInitThread(), NtQueueApcThread(), NtSetTimer(), PsGetContextThread(), PspExitNormalApc(), PspTerminateThreadByPointer(), and PsSetContextThread().
{
ASSERT(TargetEnvironment <= InsertApcEnvironment);
Apc->Type = ApcObject;
Apc->Size = sizeof(KAPC);
if (TargetEnvironment == CurrentApcEnvironment)
{
Apc->ApcStateIndex = Thread->ApcStateIndex;
}
else
{
ASSERT((TargetEnvironment <= Thread->ApcStateIndex) ||
(TargetEnvironment == InsertApcEnvironment));
Apc->ApcStateIndex = TargetEnvironment;
}
Apc->Thread = Thread;
Apc->KernelRoutine = KernelRoutine;
Apc->RundownRoutine = RundownRoutine;
Apc->NormalRoutine = NormalRoutine;
if (NormalRoutine)
{
Apc->ApcMode = Mode;
Apc->NormalContext = Context;
}
else
{
Apc->ApcMode = KernelMode;
Apc->NormalContext = NULL;
}
Apc->Inserted = FALSE;
}