ReactOS  r73918
gmutex.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for gmutex.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID FASTCALL KeInitializeGuardedMutex (OUT PKGUARDED_MUTEX GuardedMutex)
 
VOID FASTCALL KeAcquireGuardedMutex (IN PKGUARDED_MUTEX GuardedMutex)
 
VOID FASTCALL KeReleaseGuardedMutex (IN OUT PKGUARDED_MUTEX GuardedMutex)
 
VOID FASTCALL KeAcquireGuardedMutexUnsafe (IN OUT PKGUARDED_MUTEX GuardedMutex)
 
VOID FASTCALL KeReleaseGuardedMutexUnsafe (IN OUT PKGUARDED_MUTEX GuardedMutex)
 
BOOLEAN FASTCALL KeTryToAcquireGuardedMutex (IN OUT PKGUARDED_MUTEX GuardedMutex)
 
KeEnterGuardedRegion

Enters a guarded region. This causes all (incl. special kernel) APCs to be disabled.

VOID NTAPI _KeEnterGuardedRegion (VOID)
 
KeLeaveGuardedRegion

Leaves a guarded region and delivers pending APCs if possible.

VOID NTAPI _KeLeaveGuardedRegion (VOID)
 

Macro Definition Documentation

#define NDEBUG

Definition at line 13 of file gmutex.c.

Function Documentation

VOID NTAPI _KeEnterGuardedRegion ( VOID  )

Definition at line 100 of file gmutex.c.

101 {
102  /* Use the inlined version */
104 }
#define KeEnterGuardedRegion()
Definition: ke_x.h:34
VOID NTAPI _KeLeaveGuardedRegion ( VOID  )

Definition at line 113 of file gmutex.c.

114 {
115  /* Use the inlined version */
117 }
#define KeLeaveGuardedRegion()
Definition: ke_x.h:63
VOID FASTCALL KeAcquireGuardedMutex ( IN PKGUARDED_MUTEX  GuardedMutex)

Definition at line 42 of file gmutex.c.

Referenced by _Function_class_(), CcFlushCache(), CcRosCreateVacb(), CcRosDeleteFileCache(), CcRosDereferenceCache(), CcRosFlushDirtyPages(), CcRosFlushVacb(), CcRosGetVacb(), CcRosInitializeFileCache(), CcRosLookupVacb(), CcRosMarkDirtyVacb(), CcRosReferenceCache(), CcRosReleaseFileCache(), CcRosReleaseVacb(), CcRosRemoveIfClosed(), CcRosTraceCacheMap(), CcRosTrimCache(), CcRosUnmapVacb(), CcSetFileSizes(), CcTryToInitializeFileCache(), CmFlushKey(), CmpAddToDelayedClose(), CmpAllocateDelayItem(), CmpAllocateKeyControlBlock(), CmpDelayDerefKeyControlBlock(), CmpFreeDelayItem(), CmpFreeKeyControlBlock(), CmpRemoveFromDelayedClose(), CreateUsbChildDeviceObject(), DestroyUsbChildDeviceObject(), EnumerateDevices(), ExLockPool(), FsRtlAddLargeMcbEntry(), FsRtlGetNextLargeMcbEntry(), FsRtlLookupLargeMcbEntry(), FsRtlLookupLastLargeMcbEntry(), FsRtlLookupLastLargeMcbEntryAndIndex(), FsRtlNumberOfRunsInLargeMcb(), FsRtlRemoveLargeMcbEntry(), FsRtlResetLargeMcb(), FsRtlSplitLargeMcb(), FsRtlTruncateLargeMcb(), HalpAssignDrive(), IopNotifyPlugPlayNotification(), IoRegisterPlugPlayNotification(), IoUnregisterPlugPlayNotification(), IsValidPDO(), LpcExitThread(), LpcpAllocateFromPortZone(), LpcpCopyRequestData(), LpcpDeletePort(), LpcpDestroyPortQueue(), LpcpFreeConMsg(), LpcpFreeToPortZone(), LpcpSaveDataInfoMessage(), LpcRequestPort(), LpcRequestWaitReplyPort(), MiAllocatePoolPages(), MiDeleteARM3Section(), MiFreePoolPages(), MiInitializePoolEvents(), MiInsertInSystemSpace(), MiInsertVadEx(), MiMapViewOfDataSection(), MiReleaseProcessReferenceToSessionDataPage(), MiSessionCreateInternal(), MiUnmapViewInSystemSpace(), MmCommitSessionMappedView(), MmCreateArm3Section(), MmDeleteTeb(), MmLockAddressSpace(), NtAcceptConnectPort(), NtCompleteConnectPort(), NtImpersonateClientOfPort(), NtReplyPort(), NtReplyWaitReceivePortEx(), NtRequestPort(), NtRequestWaitReplyPort(), NtSecureConnectPort(), ObDereferenceDeviceMap(), ObIsDosDeviceLocallyMapped(), ObpCreateSymbolicLinkName(), ObpDeleteSymbolicLinkName(), ObQueryDeviceMapInformation(), PnpRootCreateDevice(), PnpRootPdoPnpControl(), PnpRootQueryDeviceRelations(), PnpRootRegisterDevice(), PopFlushVolumes(), PopFlushVolumeWorker(), PopProcessShutDownLists(), PoQueueShutdownWorkItem(), PoRemoveVolumeDevice(), PoRequestShutdownWait(), PoVolumeDevice(), PsGetNextProcess(), PspCreateProcess(), PspDeleteProcess(), SepRmCreateLogonSession(), SepRmDereferenceLogonSession(), SepRmReferenceLogonSession(), USBHUB_FdoHandleDeviceControl(), USBHUB_FdoHandlePnp(), and USBHUB_FdoQueryBusRelations().

43 {
44  /* Call the inline */
45  _KeAcquireGuardedMutex(GuardedMutex);
46 }
FORCEINLINE VOID _KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1573
VOID FASTCALL KeAcquireGuardedMutexUnsafe ( IN OUT PKGUARDED_MUTEX  GuardedMutex)

Definition at line 64 of file gmutex.c.

Referenced by MmCommitSessionMappedView(), and NtAllocateVirtualMemory().

65 {
66  /* Call the inline */
67  _KeAcquireGuardedMutexUnsafe(GuardedMutex);
68 }
FORCEINLINE VOID _KeAcquireGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1508
VOID FASTCALL KeReleaseGuardedMutex ( IN OUT PKGUARDED_MUTEX  GuardedMutex)

Definition at line 53 of file gmutex.c.

Referenced by _Function_class_(), CcFlushCache(), CcRosCreateVacb(), CcRosDeleteFileCache(), CcRosDereferenceCache(), CcRosFlushDirtyPages(), CcRosFlushVacb(), CcRosGetVacb(), CcRosInitializeFileCache(), CcRosLookupVacb(), CcRosMarkDirtyVacb(), CcRosReferenceCache(), CcRosReleaseFileCache(), CcRosReleaseVacb(), CcRosRemoveIfClosed(), CcRosTraceCacheMap(), CcRosTrimCache(), CcRosUnmapVacb(), CcSetFileSizes(), CcTryToInitializeFileCache(), CmFlushKey(), CmpAddToDelayedClose(), CmpAllocateDelayItem(), CmpAllocateKeyControlBlock(), CmpDelayDerefKeyControlBlock(), CmpFreeDelayItem(), CmpFreeKeyControlBlock(), CmpRemoveFromDelayedClose(), CreateUsbChildDeviceObject(), DestroyUsbChildDeviceObject(), EnumerateDevices(), ExUnlockPool(), FsRtlAddLargeMcbEntry(), FsRtlGetNextLargeMcbEntry(), FsRtlLookupLargeMcbEntry(), FsRtlLookupLastLargeMcbEntry(), FsRtlLookupLastLargeMcbEntryAndIndex(), FsRtlNumberOfRunsInLargeMcb(), FsRtlRemoveLargeMcbEntry(), FsRtlResetLargeMcb(), FsRtlSplitLargeMcb(), FsRtlTruncateLargeMcb(), HalpAssignDrive(), IopNotifyPlugPlayNotification(), IoRegisterPlugPlayNotification(), IoUnregisterPlugPlayNotification(), IsValidPDO(), LpcExitThread(), LpcpAllocateFromPortZone(), LpcpCopyRequestData(), LpcpDeletePort(), LpcpDestroyPortQueue(), LpcpFreeConMsg(), LpcpFreeToPortZone(), LpcpSaveDataInfoMessage(), LpcRequestPort(), LpcRequestWaitReplyPort(), MiAllocatePoolPages(), MiDeleteARM3Section(), MiFreePoolPages(), MiInitializePoolEvents(), MiInsertInSystemSpace(), MiInsertVadEx(), MiMapViewOfDataSection(), MiReleaseProcessReferenceToSessionDataPage(), MiSessionCreateInternal(), MiUnmapViewInSystemSpace(), MmCommitSessionMappedView(), MmCreateArm3Section(), MmDeleteTeb(), MmUnlockAddressSpace(), NtAcceptConnectPort(), NtCompleteConnectPort(), NtImpersonateClientOfPort(), NtReplyPort(), NtReplyWaitReceivePortEx(), NtRequestPort(), NtRequestWaitReplyPort(), NtSecureConnectPort(), ObDereferenceDeviceMap(), ObIsDosDeviceLocallyMapped(), ObpCreateSymbolicLinkName(), ObpDeleteSymbolicLinkName(), ObQueryDeviceMapInformation(), PnpRootCreateDevice(), PnpRootPdoPnpControl(), PnpRootQueryDeviceRelations(), PnpRootRegisterDevice(), PopFlushVolumes(), PopFlushVolumeWorker(), PopProcessShutDownLists(), PoQueueShutdownWorkItem(), PoRemoveVolumeDevice(), PoRequestShutdownWait(), PoVolumeDevice(), PsGetNextProcess(), PspCreateProcess(), PspDeleteProcess(), SepRmCreateLogonSession(), SepRmDereferenceLogonSession(), SepRmReferenceLogonSession(), USBHUB_FdoHandleDeviceControl(), USBHUB_FdoHandlePnp(), and USBHUB_FdoQueryBusRelations().

54 {
55  /* Call the inline */
56  _KeReleaseGuardedMutex(GuardedMutex);
57 }
FORCEINLINE VOID _KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1598
VOID FASTCALL KeReleaseGuardedMutexUnsafe ( IN OUT PKGUARDED_MUTEX  GuardedMutex)

Definition at line 75 of file gmutex.c.

Referenced by MmCommitSessionMappedView(), and NtAllocateVirtualMemory().

76 {
77  /* Call the inline */
78  _KeReleaseGuardedMutexUnsafe(GuardedMutex);
79 }
FORCEINLINE VOID _KeReleaseGuardedMutexUnsafe(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1532
BOOLEAN FASTCALL KeTryToAcquireGuardedMutex ( IN OUT PKGUARDED_MUTEX  GuardedMutex)

Definition at line 86 of file gmutex.c.

Referenced by _MmTryToLockAddressSpace().

87 {
88  /* Call the inline */
89  return _KeTryToAcquireGuardedMutex(GuardedMutex);
90 }
FORCEINLINE BOOLEAN _KeTryToAcquireGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: ke_x.h:1641