mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Alex Ionescu <[email protected]>
- 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:
@@ -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 \
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -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 */
|
||||
Reference in New Issue
Block a user