ReactOS 0.4.16-dev-91-g764881a
MxEvent Class Reference

#include <mxevent.h>

Collaboration diagram for MxEvent:

Public Member Functions

__inline MxEvent ()
 
__inline ~MxEvent ()
 
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize (__in EVENT_TYPE Type, __in BOOLEAN InitialState)
 
__inline PVOID GetEvent ()
 
__inline VOID Set ()
 
__inline VOID SetWithIncrement (__in KPRIORITY Priority)
 
__inline VOID Clear ()
 
 __drv_when (Timeout==NULL &&Alertable==FALSE, __drv_valueIs(==0)) __drv_when(Timeout !
 
 __drv_valueIs (==0;==258)) __drv_when(Timeout !
 
_Must_inspect_result_ __inline NTSTATUS WaitFor (__in KWAIT_REASON WaitReason, __in KPROCESSOR_MODE WaitMode, __in BOOLEAN Alertable, __in_opt PLARGE_INTEGER Timeout)
 
__inline LONG ReadState ()
 
__inline VOID Uninitialize ()
 
MxEventGetSelfPointer (VOID)
 

Private Member Functions

MxEventoperator& (VOID)
 

Private Attributes

MdEvent m_Event
 
 DECLARE_DBGFLAG_INITIALIZED
 

Detailed Description

Definition at line 28 of file mxevent.h.

Constructor & Destructor Documentation

◆ MxEvent()

__inline MxEvent::MxEvent ( )

Definition at line 31 of file mxeventkm.h.

32{
33 //
34 // Make sure that m_Event is the first member. That way if someone passes
35 // address of MxEvent to Ke*Event functions, it would still work.
36 //
37 // If this statement causes compilation failure, check if you added a field
38 // before m_Event.
39 //
41
43}
MdEvent m_Event
Definition: mxevent.h:36
#define CLEAR_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:60
#define C_ASSERT(e)
Definition: intsafe.h:73
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

◆ ~MxEvent()

__inline MxEvent::~MxEvent ( )

Definition at line 46 of file mxeventkm.h.

47{
48}

Member Function Documentation

◆ __drv_valueIs()

MxEvent::__drv_valueIs ( )

◆ __drv_when()

MxEvent::__drv_when ( Timeout  = NULL && Alertable == FALSE,
__drv_valueIs(==0)   
)

◆ Clear()

__inline VOID MxEvent::Clear ( )

◆ GetEvent()

__inline PVOID MxEvent::GetEvent ( )

Definition at line 69 of file mxeventkm.h.

71{
73
74 return &m_Event;
75}

Referenced by FxCREvent::GetEvent().

◆ GetSelfPointer()

MxEvent * MxEvent::GetSelfPointer ( VOID  )
inline

Definition at line 110 of file mxevent.h.

113 {
114 //
115 // Since operator& is hidden, we still need to be able to get a pointer
116 // to this object, so we must make it an explicit method.
117 //
118 return this;
119 }

Referenced by FxPkgPdo::_PnpEject(), FxPkgPnp::_PnpRemoveDevice(), FxDevice::DeleteDeviceFromFailedCreateNoDelete(), FxIoQueue::Dispose(), FxChildList::GetScanEvent(), FxIoQueue::QueueDrainSynchronously(), FxIoQueue::QueueIdleSynchronously(), FxIoQueue::QueuePurgeSynchronously(), FxIoQueue::StartPowerTransitionOff(), FxIoQueue::StopProcessingForPower(), and FxInterrupt::WakeInterruptIsr().

◆ Initialize()

◆ operator&()

MxEvent * MxEvent::operator& ( VOID  )
inlineprivate

Definition at line 122 of file mxevent.h.

125 {
126 //
127 // By making the address of operator private, we make it harder
128 // to accidentally use this object in an improper fashion, ie
129 // something like this is prevented:
130 //
131 // MxEvent event;
132 // KeWaitForSingleObject(&event, ...);
133 //
134 // However please note that in some cases event pointer is needed when
135 // event is passed around, in which case, GetSelfPointer() is used and
136 // this protection is circumvented. Calling code should be careful
137 // not to pass the pointer to KeWaitForSingleObject in such cases.
138 //
139 ASSERT(FALSE);
140 return NULL;
141 }
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define ASSERT(a)
Definition: mode.c:44

◆ ReadState()

LONG __inline MxEvent::ReadState ( )

Definition at line 135 of file mxeventkm.h.

137{
139
140 return KeReadStateEvent(&m_Event);
141}
LONG NTAPI KeReadStateEvent(IN PKEVENT Event)
Definition: eventobj.c:120

Referenced by FxCREvent::ReadState().

◆ Set()

◆ SetWithIncrement()

__inline VOID MxEvent::SetWithIncrement ( __in KPRIORITY  Priority)

Definition at line 80 of file mxeventkm.h.

83{
85
87}
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
Definition: wdfinterrupt.h:655

◆ Uninitialize()

__inline VOID MxEvent::Uninitialize ( )

Definition at line 146 of file mxeventkm.h.

148{
150}

Referenced by FxFreeDriverGlobals().

◆ WaitFor()

_Must_inspect_result_ __inline NTSTATUS MxEvent::WaitFor ( __in KWAIT_REASON  WaitReason,
__in KPROCESSOR_MODE  WaitMode,
__in BOOLEAN  Alertable,
__in_opt PLARGE_INTEGER  Timeout 
)

Definition at line 115 of file mxeventkm.h.

121{
123
125 &m_Event,
126 WaitReason,
127 WaitMode,
128 Alertable,
129 Timeout
130 );
131}
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
_In_ PVOID _In_ BOOLEAN Alertable
Definition: exfuncs.h:453
static ULONG Timeout
Definition: ping.c:61

Referenced by FxCREvent::__drv_valueIs(), FxCREvent::_Acquires_lock_(), FxSystemThread::ExitThread(), FxSystemThread::Reaper(), and FxSystemThread::Thread().

Member Data Documentation

◆ DECLARE_DBGFLAG_INITIALIZED

MxEvent::DECLARE_DBGFLAG_INITIALIZED
private

Definition at line 38 of file mxevent.h.

◆ m_Event

MdEvent MxEvent::m_Event
private

Definition at line 36 of file mxevent.h.

Referenced by __drv_when(), Clear(), GetEvent(), Initialize(), MxEvent(), ReadState(), Set(), and SetWithIncrement().


The documentation for this class was generated from the following files: