Author: sginsberg
Date: Tue Mar 20 13:39:25 2012
New Revision: 56194
URL: http://svn.reactos.org/svn/reactos?rev=56194&view=rev
Log:
[NTOS]
- As a side effect to 45140 one of the "non-used debug features", breaking in with WinDbg, would no longer work. Add this back, as well as the DPC timeout debug check and support for skipping ticks.
Modified:
trunk/reactos/ntoskrnl/ke/time.c
Modified: trunk/reactos/ntoskrnl/ke/time.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/time.c?rev=561…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/time.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/time.c [iso-8859-1] Tue Mar 20 13:39:25 2012
@@ -69,6 +69,17 @@
ULARGE_INTEGER CurrentTime, InterruptTime;
LONG OldTickOffset;
+ /* Check if this tick is being skipped */
+ if (Prcb->SkipTick)
+ {
+ /* Handle it next time */
+ Prcb->SkipTick = FALSE;
+
+ /* Increase interrupt count and end the interrupt */
+ Prcb->InterruptCount++;
+ KiEndInterrupt(Irql, TrapFrame);
+ }
+
/* Add the increment time to the shared data */
InterruptTime.QuadPart = *(ULONGLONG*)&SharedUserData->InterruptTime;
InterruptTime.QuadPart += Increment;
@@ -80,6 +91,13 @@
/* Update the tick offset */
OldTickOffset = InterlockedExchangeAdd(&KiTickOffset, -(LONG)Increment);
+ /* If the debugger is enabled, check for break-in request */
+ if (KdDebuggerEnabled && KdPollBreakIn())
+ {
+ /* Break-in requested! */
+ DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
+ }
+
/* Check for full tick */
if (OldTickOffset <= (LONG)Increment)
{
@@ -121,6 +139,14 @@
{
PKTHREAD Thread = KeGetCurrentThread();
PKPRCB Prcb = KeGetCurrentPrcb();
+
+ /* Check if this tick is being skipped */
+ if (Prcb->SkipTick)
+ {
+ /* Handle it next time */
+ Prcb->SkipTick = FALSE;
+ return;
+ }
/* Increase interrupt count */
Prcb->InterruptCount++;
@@ -154,6 +180,24 @@
{
/* Handle being in a DPC */
Prcb->DpcTime++;
+
+#if DBG
+ /* Update the DPC time */
+ Prcb->DebugDpcTime++;
+
+ /* Check if we have timed out */
+ if (Prcb->DebugDpcTime == KiDPCTimeout);
+ {
+ /* We did! */
+ DbgPrint("*** DPC routine > 1 sec --- This is not a break in KeUpdateSystemTime\n");
+
+ /* Break if debugger is enabled */
+ if (KdDebuggerEnabled) DbgBreakPoint();
+
+ /* Clear state */
+ Prcb->DebugDpcTime = 0;
+ }
+#endif
}
}
Author: cgutman
Date: Sun Mar 18 22:28:14 2012
New Revision: 56185
URL: http://svn.reactos.org/svn/reactos?rev=56185&view=rev
Log:
[NTOSKRNL]
- Forgot this dereference
- Unloading works now, but there are many bugs in the device stacks that prevent it from occurring
- Usbhub will unload properly when a hub is removed for a driver update, but usbstor won't unload when all usb storage devices have been removed
- Work needs to be done to fix issues like this
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sun Mar 18 22:28:14 2012
@@ -2610,7 +2610,7 @@
Status = PipCallDriverAddDevice(DeviceNode, FALSE, DriverObject);
/* Remove the extra reference */
- //ObDereferenceObject(DriverObject);
+ ObDereferenceObject(DriverObject);
}
else
{