- Remove ke/critical.c and move its functions into ke/apc.c
- Reformat ke/apc.c code which I had written messed up (due to MSVC)
- Add a bit more commenting.

svn path=/trunk/; revision=13985
This commit is contained in:
Thomas Bluemel
2005-03-12 22:31:22 +00:00
parent 322dbd6fba
commit 2a13486746
4 changed files with 737 additions and 556 deletions
-1
View File
@@ -97,7 +97,6 @@ OBJECTS_KE = \
ke/bug.o \
ke/catch.o \
ke/clock.o \
ke/critical.o \
ke/dpc.o \
ke/device.o \
ke/event.o \
+1 -1
View File
@@ -179,7 +179,7 @@ VOID STDCALL KiDeliverApc(KPROCESSOR_MODE PreviousMode,
PVOID Reserved,
PKTRAP_FRAME TrapFrame);
VOID KiInitializeUserApc(IN PVOID Reserved,
VOID STDCALL KiInitializeUserApc(IN PVOID Reserved,
IN PKTRAP_FRAME TrapFrame,
IN PKNORMAL_ROUTINE NormalRoutine,
IN PVOID NormalContext,
+736 -498
View File
File diff suppressed because it is too large Load Diff
-56
View File
@@ -1,56 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/critical.c
* PURPOSE: Implement critical regions
*
* PROGRAMMERS: David Welch ([email protected])
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#define NDEBUG
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
/*
* @implemented
*/
VOID STDCALL KeEnterCriticalRegion (VOID)
{
PKTHREAD Thread = KeGetCurrentThread();
DPRINT("KeEnterCriticalRegion()\n");
if (!Thread) return; /* <-Early in the boot process the current thread is obseved to be NULL */
Thread->KernelApcDisable--;
}
/*
* @implemented
*/
VOID STDCALL KeLeaveCriticalRegion (VOID)
{
PKTHREAD Thread = KeGetCurrentThread();
DPRINT("KeLeaveCriticalRegion()\n");
if (!Thread) return; /* <-Early in the boot process the current thread is obseved to be NULL */
/* Reference: http://www.ntfsd.org/archive/ntfsd0104/msg0203.html */
if(++Thread->KernelApcDisable == 0)
{
if (!IsListEmpty(&Thread->ApcState.ApcListHead[KernelMode]))
{
Thread->ApcState.KernelApcPending = TRUE;
HalRequestSoftwareInterrupt(APC_LEVEL);
}
}
}
/* EOF */