ReactOS 0.4.15-dev-8138-g1e75ea8
FxCREvent Struct Reference

#include <fxwaitlock.hpp>

Collaboration diagram for FxCREvent:

Public Member Functions

 FxCREvent (__in BOOLEAN InitialState=FALSE)
 
 FxCREvent (__in EVENT_TYPE Type, __in BOOLEAN InitialState)
 
CHECK_RETURN_IF_USER_MODE NTSTATUS Initialize (__in BOOLEAN InitialState=FALSE)
 
CHECK_RETURN_IF_USER_MODE NTSTATUS Initialize (__in EVENT_TYPE Type, __in BOOLEAN InitialState)
 
 __drv_valueIs (==0;==258) _Acquires_lock_(_Global_critical_region_) NTSTATUS EnterCRAndWait(VOID)
 
NTSTATUS EnterCRAndWaitAndLeave (VOID)
 
 __drv_when (Timeout==NULL, __drv_valueIs(==0)) __drv_when(Timeout !
 
 __drv_valueIs (==0;==258)) __drv_when(Timeout !
 
_Must_inspect_result_ _Acquires_lock_ (_Global_critical_region_) NTSTATUS EnterCRAndWait(__in PLONGLONG Timeout)
 
_Must_inspect_result_ NTSTATUS EnterCRAndWaitAndLeave (__in PLONGLONG Timeout)
 
 _Releases_lock_ (_Global_critical_region_) VOID LeaveCR(VOID)
 
VOID Set (VOID)
 
VOID Clear (VOID)
 
LONG ReadState (VOID)
 
PVOID GetEvent (VOID)
 
FxCREventGetSelfPointer (VOID)
 

Private Member Functions

FxCREventoperator& (VOID)
 

Private Attributes

MxEvent m_Event
 

Detailed Description

Definition at line 16 of file fxwaitlock.hpp.

Constructor & Destructor Documentation

◆ FxCREvent() [1/2]

FxCREvent::FxCREvent ( __in BOOLEAN  InitialState = FALSE)
inline

Definition at line 17 of file fxwaitlock.hpp.

20 {
21 //
22 // For kernel mode letting c'tor do the initialization to not churn the
23 // non-shared code
24 //
25#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
27#else
29#endif
30 }
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in EVENT_TYPE Type, __in BOOLEAN InitialState)
Definition: mxeventkm.h:55
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ EVENT_TYPE _In_ BOOLEAN InitialState
Definition: exfuncs.h:169
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
@ SynchronizationEvent
MxEvent m_Event
Definition: fxwaitlock.hpp:208

◆ FxCREvent() [2/2]

FxCREvent::FxCREvent ( __in EVENT_TYPE  Type,
__in BOOLEAN  InitialState 
)
inline

Definition at line 36 of file fxwaitlock.hpp.

40 {
41#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
43#else
46#endif
47 }
Type
Definition: Type.h:7

Member Function Documentation

◆ __drv_valueIs() [1/2]

FxCREvent::__drv_valueIs ( )
inline

Definition at line 68 of file fxwaitlock.hpp.

74 {
76
77 Mx::MxEnterCriticalRegion();
78
81 FALSE,
82 NULL);
83 return status;
84 }
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ __inline NTSTATUS WaitFor(__in KWAIT_REASON WaitReason, __in KPROCESSOR_MODE WaitMode, __in BOOLEAN Alertable, __in_opt PLARGE_INTEGER Timeout)
Definition: mxeventkm.h:115
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define KernelMode
Definition: asm.h:34
Definition: ps.c:97
@ Executive
Definition: ketypes.h:415

◆ __drv_valueIs() [2/2]

FxCREvent::__drv_valueIs ( )

◆ __drv_when()

FxCREvent::__drv_when ( Timeout  = NULL,
__drv_valueIs(==0)   
)

◆ _Acquires_lock_()

_Must_inspect_result_ FxCREvent::_Acquires_lock_ ( _Global_critical_region_  )
inline

Definition at line 102 of file fxwaitlock.hpp.

107 {
109
110 Mx::MxEnterCriticalRegion();
111
114 FALSE,
116
117 return status;
118 }
static ULONG Timeout
Definition: ping.c:61

◆ _Releases_lock_()

FxCREvent::_Releases_lock_ ( _Global_critical_region_  )
inline

Definition at line 134 of file fxwaitlock.hpp.

139 {
140 Mx::MxLeaveCriticalRegion();
141 }

◆ Clear()

◆ EnterCRAndWaitAndLeave() [1/2]

_Must_inspect_result_ NTSTATUS FxCREvent::EnterCRAndWaitAndLeave ( __in PLONGLONG  Timeout)
inline

Definition at line 122 of file fxwaitlock.hpp.

125 {
127
128 status = EnterCRAndWait(Timeout);
129 LeaveCR();
130
131 return status;
132 }

◆ EnterCRAndWaitAndLeave() [2/2]

◆ GetEvent()

◆ GetSelfPointer()

FxCREvent * FxCREvent::GetSelfPointer ( VOID  )
inline

Definition at line 180 of file fxwaitlock.hpp.

183 {
184 //
185 // Since operator& is hidden, we still need to be able to get a pointer
186 // to this object, so we must make it an explicit method.
187 //
188 return this;
189 }

Referenced by __drv_maxIRQL(), FxPkgPnp::CleanupStateMachines(), FxPkgPnp::ReleasePowerThread(), and FxIoTarget::WaitForDisposeEvent().

◆ Initialize() [1/2]

◆ Initialize() [2/2]

CHECK_RETURN_IF_USER_MODE NTSTATUS FxCREvent::Initialize ( __in EVENT_TYPE  Type,
__in BOOLEAN  InitialState 
)
inline

Definition at line 60 of file fxwaitlock.hpp.

64 {
66 }

◆ operator&()

FxCREvent * FxCREvent::operator& ( VOID  )
inlineprivate

Definition at line 191 of file fxwaitlock.hpp.

194 {
195 //
196 // By making the address of operator private, we make it harder (hopefully
197 // impossible) to accidentally use this object in an improper fashion, ie
198 // something like this is prevented:
199 //
200 // FxCREvent event;
201 // KeWaitForSingleObject(&event, ...);
202 //
203 ASSERT(FALSE);
204 return NULL;
205 }
#define ASSERT(a)
Definition: mode.c:44

◆ ReadState()

LONG FxCREvent::ReadState ( VOID  )
inline

Definition at line 160 of file fxwaitlock.hpp.

163 {
164 return m_Event.ReadState();
165 }
__inline LONG ReadState()
Definition: mxeventkm.h:135

Referenced by FxPowerIdleMachine::InD0Locked(), and FxPowerIdleMachine::IsTransitioning().

◆ Set()

Member Data Documentation

◆ m_Event

MxEvent FxCREvent::m_Event
private

The documentation for this struct was generated from the following file: