- Request DPC/APC software interrupts where we should.
- Fix condition in KeUpdateRunTime to allow switching thread early in the boot.
- Set default thread quantum for system process.
svn path=/trunk/; revision=11514
-/* $Id: irql.c,v 1.17 2004/10/23 23:43:23 ion Exp $
+/* $Id: irql.c,v 1.18 2004/10/31 21:22:06 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
return;
}
KeGetCurrentKPCR()->Irql = DISPATCH_LEVEL;
- KiDispatchInterrupt();
+ if (DpcRequested)
+ {
+ DpcRequested = FALSE;
+ KiDispatchInterrupt();
+ }
KeGetCurrentKPCR()->Irql = APC_LEVEL;
if (NewIrql == APC_LEVEL)
{
if (Apc->ApcMode == KernelMode && TargetThread == KeGetCurrentThread() &&
Apc->NormalRoutine == NULL)
{
+ HalRequestSoftwareInterrupt(APC_LEVEL);
KeLowerIrql(oldlvl);
return TRUE;
}
KeRemoveAllWaitsThread(CONTAINING_RECORD(TargetThread, ETHREAD, Tcb),
STATUS_USER_APC, TRUE);
}
+ HalRequestSoftwareInterrupt(APC_LEVEL);
KeLowerIrql(oldlvl);
return TRUE;
}
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: dpc.c,v 1.44 2004/10/31 17:02:31 hbirr Exp $
+/* $Id: dpc.c,v 1.45 2004/10/31 21:22:06 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
{
Pcr->PrcbData.MaximumDpcQueueDepth = Pcr->PrcbData.DpcData[0].DpcQueueDepth;
}
+ HalRequestSoftwareInterrupt(DISPATCH_LEVEL);
KiReleaseSpinLock(&Pcr->PrcbData.DpcData[0].DpcLock);
KeLowerIrql(oldlvl);
DPRINT("DpcQueueHead.Flink %x\n", Pcr->PrcbData.DpcData[0].DpcListHead.Flink);
-/* $Id: timer.c,v 1.86 2004/10/31 15:24:06 hbirr Exp $
+/* $Id: timer.c,v 1.87 2004/10/31 21:22:06 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
Pcr = KeGetCurrentKPCR();
- /*
- * Make sure no counting can take place until Processes and Threads are
- * running!
- */
- if ((PsInitialSystemProcess == NULL) || (Pcr->PrcbData.IdleThread == NULL) ||
- (KiTimerSystemAuditing == 0))
- {
- return;
- }
+ /* Make sure we don't go further if we're in early boot phase. */
+ if (Pcr == NULL || Pcr->PrcbData.CurrentThread == NULL)
+ return;
DPRINT("KernelTime %u, UserTime %u \n", Pcr->PrcbData.KernelTime, Pcr->PrcbData.UserTime);
- CurrentThread = /* Pcr->PcrbData.CurrentThread */ KeGetCurrentThread();
+ CurrentThread = Pcr->PrcbData.CurrentThread;
CurrentProcess = CurrentThread->ApcState.Process;
/*
-/* $Id: process.c,v 1.147 2004/10/30 23:48:57 navaraf Exp $
+/* $Id: process.c,v 1.148 2004/10/31 21:22:06 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
PsInitialSystemProcess->Pcb.LdtDescriptor[0] = 0;
PsInitialSystemProcess->Pcb.LdtDescriptor[1] = 0;
PsInitialSystemProcess->Pcb.BasePriority = PROCESS_PRIO_NORMAL;
+ PsInitialSystemProcess->Pcb.ThreadQuantum = 6;
InitializeListHead(&PsInitialSystemProcess->Pcb.ThreadListHead);
KeInitializeDispatcherHeader(&PsInitialSystemProcess->Pcb.DispatcherHeader,
InternalProcessType,