- Fixed the access to the KPCR in KiQuantumEnd.

svn path=/trunk/; revision=12692
This commit is contained in:
Hartmut Birr 2005-01-01 11:33:31 +00:00
parent 576224deec
commit b167684edc

View file

@ -19,7 +19,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.50 2004/12/24 17:06:58 navaraf Exp $ /* $Id$
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -411,7 +411,7 @@ KiQuantumEnd(VOID)
* Called when deleting a Driver. * Called when deleting a Driver.
*/ */
{ {
KPRCB Prcb; PKPRCB Prcb;
PKTHREAD CurrentThread; PKTHREAD CurrentThread;
KIRQL OldIrql; KIRQL OldIrql;
PKPROCESS Process; PKPROCESS Process;
@ -419,7 +419,7 @@ KiQuantumEnd(VOID)
KPRIORITY NewPriority; KPRIORITY NewPriority;
/* Lock dispatcher, get current thread */ /* Lock dispatcher, get current thread */
Prcb = KeGetCurrentKPCR()->PrcbData; Prcb = &KeGetCurrentKPCR()->PrcbData;
CurrentThread = KeGetCurrentThread(); CurrentThread = KeGetCurrentThread();
OldIrql = KeRaiseIrqlToSynchLevel(); OldIrql = KeRaiseIrqlToSynchLevel();
@ -427,8 +427,8 @@ KiQuantumEnd(VOID)
Process = CurrentThread->ApcState.Process; Process = CurrentThread->ApcState.Process;
/* Set DPC Event if requested */ /* Set DPC Event if requested */
if (Prcb.DpcSetEventRequest) { if (Prcb->DpcSetEventRequest) {
KeSetEvent(Prcb.DpcEvent, 0, 0); KeSetEvent(Prcb->DpcEvent, 0, 0);
} }
/* Check if Quantum expired */ /* Check if Quantum expired */
@ -449,7 +449,7 @@ KiQuantumEnd(VOID)
CurrentThread->Priority = NewPriority; CurrentThread->Priority = NewPriority;
} else { } else {
/* Queue new thread if none is already */ /* Queue new thread if none is already */
if (Prcb.NextThread == NULL) { if (Prcb->NextThread == NULL) {
/* FIXME: Schedule a New Thread, when ROS will have NT Scheduler */ /* FIXME: Schedule a New Thread, when ROS will have NT Scheduler */
} else { } else {
/* Make the current thread non-premeptive if a new thread is queued */ /* Make the current thread non-premeptive if a new thread is queued */