Lots of changes to the kernel
[reactos.git] / reactos / ntoskrnl / ke / critical.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/ke/critical.c
5 * PURPOSE: Implement critical regions
6 * PROGRAMMER: David Welch (welch@mcmail.com)
7 * UPDATE HISTORY:
8 * Created 22/05/98
9 */
10
11 /* INCLUDES *****************************************************************/
12
13 #include <ddk/ntddk.h>
14
15 //#define NDEBUG
16 #include <internal/debug.h>
17
18 /* FUNCTIONS *****************************************************************/
19
20 VOID KeEnterCriticalRegion()
21 {
22 DPRINT("KeEnterCriticalRegion()\n");
23 KeGetCurrentThread()->KernelApcDisable -= 1;
24 }
25
26 VOID KeLeaveCriticalRegion()
27 {
28 DPRINT("KeLeaveCriticalRegion()\n");
29 KeGetCurrentThread()->KernelApcDisable += 1;
30 }