ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

freeze.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS Kernel
00003  * LICENSE:         GPL - See COPYING in the top level directory
00004  * FILE:            ntoskrnl/ke/freeze.c
00005  * PURPOSE:         Routines for freezing and unfreezing processors for
00006  *                  kernel debugger synchronization.
00007  * PROGRAMMERS:     Alex Ionescu (alex.ionescu@reactos.org)
00008  */
00009 
00010 /* INCLUDES *******************************************************************/
00011 
00012 #include <ntoskrnl.h>
00013 #define NDEBUG
00014 #include <debug.h>
00015 
00016 /* GLOBALS ********************************************************************/
00017 
00018 /* Freeze data */
00019 KIRQL KiOldIrql;
00020 ULONG KiFreezeFlag;
00021 
00022 /* FUNCTIONS ******************************************************************/
00023 
00024 BOOLEAN
00025 NTAPI
00026 KeFreezeExecution(IN PKTRAP_FRAME TrapFrame,
00027                   IN PKEXCEPTION_FRAME ExceptionFrame)
00028 {
00029     BOOLEAN Enable;
00030 
00031     /* Disable interrupts and get previous state */
00032     Enable = KeDisableInterrupts();
00033 
00034     /* Save freeze flag */
00035     KiFreezeFlag = 4;
00036 
00037     /* Save the old IRQL */
00038     KiOldIrql = KeGetCurrentIrql();
00039 
00040     /* Return whether interrupts were enabled */
00041     return Enable;
00042 }
00043 
00044 VOID
00045 NTAPI
00046 KeThawExecution(IN BOOLEAN Enable)
00047 {
00048     /* Cleanup CPU caches */
00049     KeFlushCurrentTb();
00050 
00051     /* Re-enable interrupts */
00052     if (Enable) _enable();
00053 }

Generated on Sun May 27 2012 04:37:31 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.