ReactOS 0.4.15-dev-7842-g558ab78
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 // TODO: Add SMP support.
53#endif
54
55 /* Save the old IRQL to be restored on unfreeze */
57
58 /* Return whether interrupts were enabled */
59 return Enable;
60}
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
_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 64 of file freeze.c.

65{
66#ifdef CONFIG_SMP
67 // TODO: Add SMP support.
68#endif
69
70 /* Clear the freeze flag */
71 KiFreezeFlag = 0;
72
73 /* Cleanup CPU caches */
75
76 /* Restore the old IRQL */
77#ifndef CONFIG_SMP
79#endif
81
82 /* Re-enable interrupts */
84}
#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

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().