mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 06:02:56 +00:00
- Call KiDispatchInterrupt only if DPC software interrupt was requested. (TODO: The same should be done for APCs.)
- 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
This commit is contained in:
parent
1ffec948ad
commit
129c75c64d
5 changed files with 17 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -176,7 +176,11 @@ HalpLowerIrql(KIRQL NewIrql)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
KeGetCurrentKPCR()->Irql = DISPATCH_LEVEL;
|
KeGetCurrentKPCR()->Irql = DISPATCH_LEVEL;
|
||||||
|
if (DpcRequested)
|
||||||
|
{
|
||||||
|
DpcRequested = FALSE;
|
||||||
KiDispatchInterrupt();
|
KiDispatchInterrupt();
|
||||||
|
}
|
||||||
KeGetCurrentKPCR()->Irql = APC_LEVEL;
|
KeGetCurrentKPCR()->Irql = APC_LEVEL;
|
||||||
if (NewIrql == APC_LEVEL)
|
if (NewIrql == APC_LEVEL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -370,6 +370,7 @@ KeInsertQueueApc (PKAPC Apc,
|
||||||
if (Apc->ApcMode == KernelMode && TargetThread == KeGetCurrentThread() &&
|
if (Apc->ApcMode == KernelMode && TargetThread == KeGetCurrentThread() &&
|
||||||
Apc->NormalRoutine == NULL)
|
Apc->NormalRoutine == NULL)
|
||||||
{
|
{
|
||||||
|
HalRequestSoftwareInterrupt(APC_LEVEL);
|
||||||
KeLowerIrql(oldlvl);
|
KeLowerIrql(oldlvl);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -424,6 +425,7 @@ KeInsertQueueApc (PKAPC Apc,
|
||||||
KeRemoveAllWaitsThread(CONTAINING_RECORD(TargetThread, ETHREAD, Tcb),
|
KeRemoveAllWaitsThread(CONTAINING_RECORD(TargetThread, ETHREAD, Tcb),
|
||||||
STATUS_USER_APC, TRUE);
|
STATUS_USER_APC, TRUE);
|
||||||
}
|
}
|
||||||
|
HalRequestSoftwareInterrupt(APC_LEVEL);
|
||||||
KeLowerIrql(oldlvl);
|
KeLowerIrql(oldlvl);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -304,6 +304,7 @@ KeInsertQueueDpc (PKDPC Dpc,
|
||||||
{
|
{
|
||||||
Pcr->PrcbData.MaximumDpcQueueDepth = Pcr->PrcbData.DpcData[0].DpcQueueDepth;
|
Pcr->PrcbData.MaximumDpcQueueDepth = Pcr->PrcbData.DpcData[0].DpcQueueDepth;
|
||||||
}
|
}
|
||||||
|
HalRequestSoftwareInterrupt(DISPATCH_LEVEL);
|
||||||
KiReleaseSpinLock(&Pcr->PrcbData.DpcData[0].DpcLock);
|
KiReleaseSpinLock(&Pcr->PrcbData.DpcData[0].DpcLock);
|
||||||
KeLowerIrql(oldlvl);
|
KeLowerIrql(oldlvl);
|
||||||
DPRINT("DpcQueueHead.Flink %x\n", Pcr->PrcbData.DpcData[0].DpcListHead.Flink);
|
DPRINT("DpcQueueHead.Flink %x\n", Pcr->PrcbData.DpcData[0].DpcListHead.Flink);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -698,19 +698,13 @@ KeUpdateRunTime(
|
||||||
|
|
||||||
Pcr = KeGetCurrentKPCR();
|
Pcr = KeGetCurrentKPCR();
|
||||||
|
|
||||||
/*
|
/* Make sure we don't go further if we're in early boot phase. */
|
||||||
* Make sure no counting can take place until Processes and Threads are
|
if (Pcr == NULL || Pcr->PrcbData.CurrentThread == NULL)
|
||||||
* running!
|
|
||||||
*/
|
|
||||||
if ((PsInitialSystemProcess == NULL) || (Pcr->PrcbData.IdleThread == NULL) ||
|
|
||||||
(KiTimerSystemAuditing == 0))
|
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
DPRINT("KernelTime %u, UserTime %u \n", Pcr->PrcbData.KernelTime, Pcr->PrcbData.UserTime);
|
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;
|
CurrentProcess = CurrentThread->ApcState.Process;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -293,6 +293,7 @@ PsInitProcessManagment(VOID)
|
||||||
PsInitialSystemProcess->Pcb.LdtDescriptor[0] = 0;
|
PsInitialSystemProcess->Pcb.LdtDescriptor[0] = 0;
|
||||||
PsInitialSystemProcess->Pcb.LdtDescriptor[1] = 0;
|
PsInitialSystemProcess->Pcb.LdtDescriptor[1] = 0;
|
||||||
PsInitialSystemProcess->Pcb.BasePriority = PROCESS_PRIO_NORMAL;
|
PsInitialSystemProcess->Pcb.BasePriority = PROCESS_PRIO_NORMAL;
|
||||||
|
PsInitialSystemProcess->Pcb.ThreadQuantum = 6;
|
||||||
InitializeListHead(&PsInitialSystemProcess->Pcb.ThreadListHead);
|
InitializeListHead(&PsInitialSystemProcess->Pcb.ThreadListHead);
|
||||||
KeInitializeDispatcherHeader(&PsInitialSystemProcess->Pcb.DispatcherHeader,
|
KeInitializeDispatcherHeader(&PsInitialSystemProcess->Pcb.DispatcherHeader,
|
||||||
InternalProcessType,
|
InternalProcessType,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue