ReactOS 0.4.15-dev-7953-g1f49173
mxworkitem.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5ModuleName:
6
7 MxWorkItem.h
8
9Abstract:
10
11 Mode agnostic definition of WorkItem functions
12
13 See MxWorkItemKm.h and MxWorkItemUm.h for mode
14 specific implementations
15
16Author:
17
18
19
20Revision History:
21
22
23
24--*/
25
26#pragma once
27
29{
30
31protected:
33
34public:
35
36 __inline
38 );
39
40 //
41 // This is used only by the UM implementation
42 //
43
44#if ((FX_CORE_MODE)==(FX_CORE_USER_MODE))
45 static
46 VOID
51 _Inout_ PTP_WAIT Wait,
52 _In_ TP_WAIT_RESULT WaitResult
53 );
54
55 VOID
57 VOID
58 );
59
60#endif
61
63 __inline
67 __in_opt PVOID ThreadPoolEnv = NULL
68 );
69
70 __inline
71 VOID
72 Enqueue(
75 );
76
77 __inline
80 );
81
82 static
83 __inline
84 VOID
85 _Free(
87 );
88
89 __inline
90 VOID
91 Free(
92 );
93
94 __inline
96 )
97 {
98 }
99
100};
101
102//
103// MxAutoWorkItem adds value to MxWorkItem by automatically freeing the
104// associated MdWorkItem when it goes out of scope
105//
106struct MxAutoWorkItem : public MxWorkItem {
107public:
108
110 )
111 {
112 }
113
114 __inline
116 );
117};
118
LONG NTSTATUS
Definition: precomp.h:26
__inline MxWorkItem()
Definition: mxworkitemkm.h:32
VOID WaitForCallbacksToComplete(VOID)
__inline MdWorkItem GetWorkItem()
Definition: mxworkitemkm.h:73
static __inline VOID _Free(__in MdWorkItem Item)
Definition: mxworkitemkm.h:81
__inline VOID Free()
Definition: mxworkitemkm.h:90
MdWorkItem m_WorkItem
Definition: mxworkitem.h:32
__inline ~MxWorkItem()
Definition: mxworkitem.h:95
static VOID CALLBACK _WorkerThunk(_Inout_ PTP_CALLBACK_INSTANCE Instance, _Inout_opt_ PVOID Parameter, _Inout_ PTP_WAIT Wait, _In_ TP_WAIT_RESULT WaitResult)
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define NULL
Definition: types.h:112
#define CALLBACK
Definition: compat.h:35
pFxWorkItem Enqueue()
#define _Inout_
Definition: ms_sal.h:378
#define _Inout_opt_
Definition: ms_sal.h:379
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _In_
Definition: ms_sal.h:308
IO_WORKITEM_ROUTINE * PMX_WORKITEM_ROUTINE
Definition: mxworkitemkm.h:26
__inline ~MxAutoWorkItem()
Definition: mxworkitemkm.h:103
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481
struct _TP_CALLBACK_INSTANCE * PTP_CALLBACK_INSTANCE
Definition: winnt_old.h:4453
_In_opt_ PALLOCATE_FUNCTION Allocate
Definition: exfuncs.h:814
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:323