ReactOS
0.4.16-dev-814-g656a5dc
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
eventqueueum.cpp
Go to the documentation of this file.
1
/*++
2
3
Copyright (c) Microsoft. All rights reserved.
4
5
Module Name:
6
7
EventQueueUm.cpp
8
9
Abstract:
10
11
This module implements user mode specific functionality of event queue
12
13
This functionality needed to be separated out since the KM portion takes
14
a reference on driver object because KM MxWorkItem::_Free does not wait for
15
callback to return (i.e. rundown synchronously).
16
17
MxWorkItem::_Free in UM currently waits for callback to return (i.e. runs
18
down synchronously) hence does not need a reference on driver/devstack
19
object (see comments on top of MxWorkItemUm.h file).
20
21
In future if UM work-item is made similar to km workitem, UMDF may need to
22
ensure that modules stay loaded, though the mechanism to ensure that would
23
likely be different from a reference on the driver. It would likely be a
24
reference on the devicestack object.
25
26
Environment:
27
28
User mode only
29
30
Revision History:
31
32
33
34
35
--*/
36
37
#include "
pnppriv.hpp
"
38
39
VOID
40
FxWorkItemEventQueue::QueueWorkItem
(
41
VOID
42
)
43
{
44
//
45
// In user mode WorkItem::_Free waits for workitem callbacks to return
46
// So we don't need outstanding reference on driver object or the devstack
47
//
48
49
m_WorkItem
.
Enqueue
(
50
(
PMX_WORKITEM_ROUTINE
)
_WorkItemCallback
,
51
(
FxEventQueue
*)
this
);
52
}
53
54
VOID
55
FxWorkItemEventQueue::_WorkItemCallback
(
56
__in
MdDeviceObject
DeviceObject
,
57
__in
PVOID
Context
58
)
59
/*++
60
61
Routine Description:
62
This is the work item that attempts to run the machine on a thread
63
separate from the one the caller was using. It implements step 9 above.
64
65
--*/
66
{
67
FxWorkItemEventQueue
*
This
= (
FxWorkItemEventQueue
*)
Context
;
68
69
UNREFERENCED_PARAMETER
(
DeviceObject
);
70
71
//
72
// In user mode WorkItem::_Free waits for workitem callbacks to return
73
// So we don't need outstanding reference on driver object
74
//
75
76
This
->EventQueueWorker();
77
}
MxWorkItem::Enqueue
__inline VOID Enqueue(__in PMX_WORKITEM_ROUTINE Callback, __in PVOID Context)
Definition:
mxworkitemkm.h:58
__in
#define __in
Definition:
dbghelp.h:35
void
Definition:
nsiface.idl:2307
PMX_WORKITEM_ROUTINE
IO_WORKITEM_ROUTINE * PMX_WORKITEM_ROUTINE
Definition:
mxworkitemkm.h:26
This
UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(P)
Definition:
ntbasedef.h:325
pnppriv.hpp
Context
Definition:
compobj.c:4795
FxEventQueue
Definition:
fxeventqueue.hpp:51
FxWorkItemEventQueue
Definition:
fxeventqueue.hpp:292
FxWorkItemEventQueue::_WorkItemCallback
static MX_WORKITEM_ROUTINE _WorkItemCallback
Definition:
fxeventqueue.hpp:325
FxWorkItemEventQueue::m_WorkItem
MxWorkItem m_WorkItem
Definition:
fxeventqueue.hpp:327
FxWorkItemEventQueue::QueueWorkItem
VOID QueueWorkItem(VOID)
Definition:
eventqueuekm.cpp:40
_DEVICE_OBJECT
Definition:
env_spec_w32.h:413
DeviceObject
_In_ PDEVICE_OBJECT DeviceObject
Definition:
wdfdevice.h:2055
sdk
lib
drivers
wdf
shared
irphandlers
pnp
um
eventqueueum.cpp
Generated on Thu Mar 13 2025 06:14:28 for ReactOS by
1.9.6