mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -176,7 +176,11 @@ HalpLowerIrql(KIRQL NewIrql)
|
|||
return;
|
||||
}
|
||||
KeGetCurrentKPCR()->Irql = DISPATCH_LEVEL;
|
||||
KiDispatchInterrupt();
|
||||
if (DpcRequested)
|
||||
{
|
||||
DpcRequested = FALSE;
|
||||
KiDispatchInterrupt();
|
||||
}
|
||||
KeGetCurrentKPCR()->Irql = APC_LEVEL;
|
||||
if (NewIrql == APC_LEVEL)
|
||||
{
|
||||
|
|
|
@ -370,6 +370,7 @@ KeInsertQueueApc (PKAPC Apc,
|
|||
if (Apc->ApcMode == KernelMode && TargetThread == KeGetCurrentThread() &&
|
||||
Apc->NormalRoutine == NULL)
|
||||
{
|
||||
HalRequestSoftwareInterrupt(APC_LEVEL);
|
||||
KeLowerIrql(oldlvl);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -424,6 +425,7 @@ KeInsertQueueApc (PKAPC Apc,
|
|||
KeRemoveAllWaitsThread(CONTAINING_RECORD(TargetThread, ETHREAD, Tcb),
|
||||
STATUS_USER_APC, TRUE);
|
||||
}
|
||||
HalRequestSoftwareInterrupt(APC_LEVEL);
|
||||
KeLowerIrql(oldlvl);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* 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
|
||||
|
@ -304,6 +304,7 @@ KeInsertQueueDpc (PKDPC Dpc,
|
|||
{
|
||||
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);
|
||||
|
|
|
@ -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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -698,19 +698,13 @@ KeUpdateRunTime(
|
|||
|
||||
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;
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -293,6 +293,7 @@ PsInitProcessManagment(VOID)
|
|||
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,
|
||||
|
|
Loading…
Reference in a new issue