ReactOS 0.4.15-dev-8064-gdaf8068
freeze.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for freeze.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOLEAN NTAPI KeFreezeExecution (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame)
 
VOID NTAPI KeThawExecution (IN BOOLEAN Enable)
 

Variables

KIRQL KiOldIrql
 
ULONG KiFreezeFlag
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file freeze.c.

Function Documentation

◆ KeFreezeExecution()

BOOLEAN NTAPI KeFreezeExecution ( IN PKTRAP_FRAME  TrapFrame,
IN PKEXCEPTION_FRAME  ExceptionFrame 
)

Definition at line 26 of file freeze.c.

28{
31
32#ifndef CONFIG_SMP
33 UNREFERENCED_PARAMETER(TrapFrame);
34 UNREFERENCED_PARAMETER(ExceptionFrame);
35#endif
36
37 /* Disable interrupts, get previous state and set the freeze flag */
39 KiFreezeFlag = 4;
40
41#ifndef CONFIG_SMP
42 /* Raise IRQL if we have to */
46#else
47 /* Raise IRQL to HIGH_LEVEL */
49#endif
50
51#ifdef CONFIG_SMP
52 /* Architecture specific freeze code */
54#endif
55
56 /* Save the old IRQL to be restored on unfreeze */
58
59 /* Return whether interrupts were enabled */
60 return Enable;
61}
unsigned char BOOLEAN
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define HIGH_LEVEL
Definition: env_spec_w32.h:703
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment KeRaiseIrqlToDpcLevel
Definition: CrNtStubs.h:68
ULONG KiFreezeFlag
Definition: freeze.c:20
KIRQL KiOldIrql
Definition: freeze.c:19
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
FORCEINLINE BOOLEAN KeDisableInterrupts(VOID)
Definition: ke.h:239
VOID NTAPI KxFreezeExecution(VOID)
Definition: freeze.c:78
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778

Referenced by KdEnterDebugger().

◆ KeThawExecution()

VOID NTAPI KeThawExecution ( IN BOOLEAN  Enable)

Definition at line 65 of file freeze.c.

66{
67#ifdef CONFIG_SMP
68 /* Architecture specific thaw code */
70#endif
71
72 /* Clear the freeze flag */
73 KiFreezeFlag = 0;
74
75 /* Cleanup CPU caches */
77
78 /* Restore the old IRQL */
79#ifndef CONFIG_SMP
81#endif
83
84 /* Re-enable interrupts */
86}
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
FORCEINLINE VOID KeRestoreInterrupts(BOOLEAN WereEnabled)
Definition: ke.h:254
VOID NTAPI KeFlushCurrentTb(VOID)
Definition: cpu.c:526
VOID NTAPI KxThawExecution(VOID)
Definition: freeze.c:141

Referenced by KdExitDebugger().

Variable Documentation

◆ KiFreezeFlag

ULONG KiFreezeFlag

Definition at line 20 of file freeze.c.

Referenced by KdEnterDebugger(), KeFreezeExecution(), and KeThawExecution().

◆ KiOldIrql

KIRQL KiOldIrql

Definition at line 19 of file freeze.c.

Referenced by KeFreezeExecution(), and KeThawExecution().