ReactOS  0.4.15-dev-3446-g30010a5
fxsystemthreadum.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxSystemThreadUm.cpp
8 
9 Abstract:
10 
11  This is the implementation of the FxSystemThread object.
12 
13 
14 Author:
15 
16 
17 
18 
19 
20 Environment:
21 
22  User mode only
23 
24 Revision History:
25 
26 
27 --*/
28 
29 #include <fxmin.hpp>
30 
31 #pragma warning(push)
32 #pragma warning(disable:4100) //unreferenced parameter
33 
35  __in PFX_DRIVER_GLOBALS FxDriverGlobals
36  ) :
37  FxNonPagedObject(FX_TYPE_SYSTEMTHREAD, 0, FxDriverGlobals)
38 {
40 }
41 
43 {
45 }
46 
50  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
51  __in WDFDEVICE Device,
53  )
54 {
56 
58 }
59 
60 //
61 // Create the system thread in order to be able to service work items
62 //
63 // It is recommended this is done from the system process context
64 // since the threads handle is available to the user mode process
65 // for a temporary window. XP and later supports OBJ_KERNELHANDLE, but
66 // DriverFrameworks must support W2K with the same binary.
67 //
68 // It is safe to call this at DriverEntry which is in the system process
69 // to create an initial driver thread, and this driver thread should be
70 // used for creating any child driver threads on demand.
71 //
72 BOOLEAN
74 {
76  return FALSE;
77 }
78 
81  VOID
82  )
83 {
86 }
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 //
100 // This is called to tell the thread to exit.
101 //
102 // It must be called from thread context such as
103 // the driver unload routine since it will wait for the
104 // thread to exit.
105 //
106 BOOLEAN
108 {
110  return FALSE;
111 }
112 
113 BOOLEAN
115  __inout FxSystemThread* Reaper
116  )
117 {
119  return FALSE;
120 }
121 
122 BOOLEAN
125  )
126 {
128  return FALSE;
129 }
130 
131 //
132 // Attempt to cancel the work item.
133 //
134 // Returns TRUE if success.
135 //
136 // If returns FALSE, the work item
137 // routine either has been called, is running,
138 // or is about to be called.
139 //
140 BOOLEAN
143  )
144 {
146  return FALSE;
147 }
148 
149 VOID
151 {
153 }
154 
155 
156 
157 
158 
159 
160 
161 
162 
163 
164 
165 
166 
167 VOID
169 {
171 }
172 
173 VOID
176  )
177 {
179 }
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 VOID
194  )
195 {
197 }
198 
199 #pragma warning(pop)
BOOLEAN QueueWorkItem(__inout PWORK_QUEUE_ITEM WorkItem)
static VOID STDCALL StaticReaperThunk(__inout PVOID Context)
BOOLEAN Initialize(VOID)
LONG NTSTATUS
Definition: precomp.h:26
VOID UfxVerifierTrapNotImpl()
virtual ~FxSystemThread(VOID)
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
return STATUS_NOT_IMPLEMENTED
BOOLEAN ExitThreadAsync(__inout FxSystemThread *Reaper)
#define FALSE
Definition: types.h:117
static VOID NTAPI SystemThread(_In_ PVOID Context)
#define __out
Definition: dbghelp.h:62
unsigned char BOOLEAN
BOOLEAN ExitThread(VOID)
static _Must_inspect_result_ NTSTATUS _CreateAndInit(__deref_out FxSystemThread **SystemThread, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDFDEVICE Device, __in MdDeviceObject DeviceObject)
#define __inout
Definition: dbghelp.h:50
FxSystemThread(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
static VOID STDCALL StaticThreadThunk(__inout PVOID Context)
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
Definition: wdfworkitem.h:110
#define __in
Definition: dbghelp.h:35
_Must_inspect_result_ NTSTATUS CreateThread(VOID)
BOOLEAN CancelWorkItem(__inout PWORK_QUEUE_ITEM WorkItem)