ReactOS 0.4.16-dev-106-g10b08aa
FxWatchdog Struct Reference

#include <fxwatchdog.hpp>

Collaboration diagram for FxWatchdog:

Public Member Functions

 FxWatchdog (__in FxPkgPnp *PkgPnp)
 
VOID StartTimer (__in ULONG State)
 
VOID CancelTimer (__in ULONG State)
 

Public Attributes

MxTimer m_Timer
 
FxPkgPnpm_PkgPnp
 
MxThread m_CallingThread
 

Static Public Attributes

static MdDeferredRoutineType _WatchdogDpc
 

Detailed Description

Definition at line 29 of file fxwatchdog.hpp.

Constructor & Destructor Documentation

◆ FxWatchdog()

FxWatchdog::FxWatchdog ( __in FxPkgPnp PkgPnp)
inline

Definition at line 30 of file fxwatchdog.hpp.

33 {
34 m_PkgPnp = PkgPnp;
35 }
FxPkgPnp * m_PkgPnp
Definition: fxwatchdog.hpp:110

Member Function Documentation

◆ CancelTimer()

VOID FxWatchdog::CancelTimer ( __in ULONG  State)
inline

Definition at line 91 of file fxwatchdog.hpp.

94 {
95 if (State & WdfDevStateNP) {
96 //
97 // The state was successfully handled without the timer expiring.
98 // We don't care about the return code in this case.
99 //
100 (void) m_Timer.Stop();
101 }
102 }
_Must_inspect_result_ __inline BOOLEAN Stop(VOID)
Definition: mxtimerkm.h:273
MxTimer m_Timer
Definition: fxwatchdog.hpp:108
@ WdfDevStateNP
Definition: wdfdevice.h:56

Referenced by FxPkgPnp::PowerEnterNewState(), and FxPkgPnp::PowerPolicyEnterNewState().

◆ StartTimer()

VOID FxWatchdog::StartTimer ( __in ULONG  State)
inline

Definition at line 38 of file fxwatchdog.hpp.

41 {
44
45 if (State & WdfDevStateNP) {
46 //
47 // This is a non-pageable state. So we set the timer watchdog.
48 // If it fires, it means that the driver stalled, probably due
49 // to a page fault, which means that the whole machine is wedged.
50 // We will then attempt to put the failure in the trace log
51 // and bring the machine down, hopefully getting the reason we
52 // stopped responding into the crashdump. (This will probably only work
53 // if the machine is hibernating.)
54 //
55 // If the state function returns, then we'll cancel the timer
56 // and no love will be lost.
57 //
59
60 //
61 // This code is not used in UM. Hence we can assert and assume that
62 // timer start will always be successful.
63 //
65
67
69
71 //
72 // 24 hours:
73 // 60 = to minutes
74 // 60 = to hours
75 // 24 = number of hours
76 //
77 time.QuadPart = WDF_REL_TIMEOUT_IN_SEC(60 * 60 * 24);
78 }
79 else {
80 //
81 // 10 minutes from now (same as the Vista timeout)
82 //
83 time.QuadPart = WDF_REL_TIMEOUT_IN_SEC(60 * 10);
84 }
85
87 }
88 }
LONG NTSTATUS
Definition: precomp.h:26
SharedPowerData m_SharedPower
Definition: fxpkgpnp.hpp:4161
__inline VOID Start(__in LARGE_INTEGER DueTime, __in ULONG TolerableDelay=0)
Definition: mxtimerkm.h:251
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in_opt PVOID TimerContext, __in MdDeferredRoutine TimerCallback, __in LONG Period)
Definition: mxtimerkm.h:119
static __inline MxThread MxGetCurrentThread()
Definition: mxgeneralkm.h:61
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define WDF_VERIFY_KM_ONLY_CODE()
Definition: fxmacros.hpp:298
#define FX_ASSERT_AND_ASSUME_FOR_PREFAST(b)
Definition: fxmacros.hpp:284
__u16 time
Definition: mkdosfs.c:8
static MdDeferredRoutineType _WatchdogDpc
Definition: fxwatchdog.hpp:106
MxThread m_CallingThread
Definition: fxwatchdog.hpp:112
BOOLEAN m_ExtendWatchDogTimer
Definition: fxpkgpnp.hpp:196
Definition: ps.c:97
FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_SEC(_In_ ULONGLONG Time)
Definition: wdfcore.h:62

Referenced by FxPkgPnp::PowerEnterNewState(), and FxPkgPnp::PowerPolicyEnterNewState().

Member Data Documentation

◆ _WatchdogDpc

MdDeferredRoutineType FxWatchdog::_WatchdogDpc
static

Definition at line 106 of file fxwatchdog.hpp.

Referenced by StartTimer().

◆ m_CallingThread

MxThread FxWatchdog::m_CallingThread

Definition at line 112 of file fxwatchdog.hpp.

Referenced by __drv_maxIRQL(), and StartTimer().

◆ m_PkgPnp

FxPkgPnp* FxWatchdog::m_PkgPnp

Definition at line 110 of file fxwatchdog.hpp.

Referenced by __drv_maxIRQL(), FxWatchdog(), and StartTimer().

◆ m_Timer

MxTimer FxWatchdog::m_Timer

Definition at line 108 of file fxwatchdog.hpp.

Referenced by CancelTimer(), and StartTimer().


The documentation for this struct was generated from the following file: