ReactOS 0.4.16-dev-297-gc569aee
mxeventkm.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5ModuleName:
6
7 MxEvent.h
8
9Abstract:
10
11 Kernel mode implementation of event
12 class defined in MxEvent.h
13
14Author:
15
16
17
18Revision History:
19
20
21
22--*/
23
24#pragma once
25
27
28#include "mxevent.h"
29
30__inline
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}
44
45__inline
47{
48}
49
50__inline
52#ifdef _MSC_VER
53#pragma prefast(suppress:__WARNING_UNMATCHED_DECL_ANNO, "_Must_inspect_result_ not needed in kernel mode as the function always succeeds");
54#endif
58 )
59{
61
63
64 return STATUS_SUCCESS;
65}
66
67__inline
70 )
71{
73
74 return &m_Event;
75}
76
77
78__inline
79VOID
82 )
83{
85
87}
88
89__inline
90VOID
92 )
93{
95
97}
98
99
100__inline
101VOID
103 )
104{
106
108}
109
113__inline
115MxEvent::WaitFor(
116 __in KWAIT_REASON WaitReason,
117 __in KPROCESSOR_MODE WaitMode,
120 )
121{
123
125 &m_Event,
126 WaitReason,
127 WaitMode,
128 Alertable,
129 Timeout
130 );
131}
132
133LONG
134__inline
136 )
137{
139
140 return KeReadStateEvent(&m_Event);
141}
142
143
144__inline
145VOID
147 )
148{
150}
unsigned char BOOLEAN
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
__inline VOID SetWithIncrement(__in KPRIORITY Priority)
Definition: mxeventkm.h:80
__inline VOID Clear()
Definition: mxeventkm.h:102
__inline VOID Uninitialize()
Definition: mxeventkm.h:146
__inline ~MxEvent()
Definition: mxeventkm.h:46
__inline PVOID GetEvent()
Definition: mxeventkm.h:69
__inline VOID Set()
Definition: mxeventkm.h:91
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in EVENT_TYPE Type, __in BOOLEAN InitialState)
Definition: mxeventkm.h:55
__inline MxEvent()
Definition: mxeventkm.h:31
__inline LONG ReadState()
Definition: mxeventkm.h:135
MdEvent m_Event
Definition: mxevent.h:36
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define ASSERT_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:58
#define SET_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:59
#define CLEAR_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:60
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG KPRIORITY
Definition: compat.h:803
#define __drv_when(cond, annotes)
Definition: driverspecs.h:335
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
Definition: env_spec_w32.h:478
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
VOID NTAPI KeClearEvent(IN PKEVENT Event)
Definition: eventobj.c:22
LONG NTAPI KeReadStateEvent(IN PKEVENT Event)
Definition: eventobj.c:120
#define C_ASSERT(e)
Definition: intsafe.h:73
KEVENT MdEvent
Definition: mxeventkm.h:26
__drv_valueIs(==0;==258)) __drv_when(Timeout !
_In_ PVOID _In_ BOOLEAN Alertable
Definition: exfuncs.h:453
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ EVENT_TYPE _In_ BOOLEAN InitialState
Definition: exfuncs.h:169
#define _Must_inspect_result_
Definition: no_sal2.h:62
enum _EVENT_TYPE EVENT_TYPE
long LONG
Definition: pedump.c:60
static ULONG Timeout
Definition: ping.c:61
#define STATUS_SUCCESS
Definition: shellext.h:65
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
Definition: wdfinterrupt.h:655
#define IO_NO_INCREMENT
Definition: iotypes.h:598
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
enum _KWAIT_REASON KWAIT_REASON