2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/ke/freeze.c
5 * PURPOSE: Routines for freezing and unfreezing processors for
6 * kernel debugger synchronization.
7 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
10 /* INCLUDES *******************************************************************/
16 /* GLOBALS ********************************************************************/
22 /* FUNCTIONS ******************************************************************/
26 KeFreezeExecution(IN PKTRAP_FRAME TrapFrame
,
27 IN PKEXCEPTION_FRAME ExceptionFrame
)
31 /* Disable interrupts and get previous state */
32 Enable
= KeDisableInterrupts();
34 /* Save freeze flag */
37 /* Save the old IRQL */
38 KiOldIrql
= KeGetCurrentIrql();
40 /* Return whether interrupts were enabled */
46 KeThawExecution(IN BOOLEAN Enable
)
48 /* Cleanup CPU caches */
51 /* Re-enable interrupts */
52 if (Enable
) _enable();