ReactOS 0.4.15-dev-7918-g2a2556c
fxsystemthreadum.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxSystemThreadUm.cpp
8
9Abstract:
10
11 This is the implementation of the FxSystemThread object.
12
13
14Author:
15
16
17
18
19
20Environment:
21
22 User mode only
23
24Revision 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//
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//
108{
110 return FALSE;
111}
112
115 __inout FxSystemThread* Reaper
116 )
117{
119 return FALSE;
120}
121
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//
143 )
144{
146 return FALSE;
147}
148
149VOID
151{
153}
154
155
156
157
158
159
160
161
162
163
164
165
166
167VOID
169{
171}
172
173VOID
176 )
177{
179}
180
181
182
183
184
185
186
187
188
189
190
191VOID
194 )
195{
197}
198
199#pragma warning(pop)
unsigned char BOOLEAN
static VOID NTAPI SystemThread(_In_ PVOID Context)
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN CancelWorkItem(__inout PWORK_QUEUE_ITEM WorkItem)
_Must_inspect_result_ NTSTATUS CreateThread(VOID)
BOOLEAN QueueWorkItem(__inout PWORK_QUEUE_ITEM WorkItem)
BOOLEAN ExitThreadAsync(__inout FxSystemThread *Reaper)
static VOID STDCALL StaticThreadThunk(__inout PVOID Context)
static VOID STDCALL StaticReaperThunk(__inout PVOID Context)
FxSystemThread(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
static _Must_inspect_result_ NTSTATUS _CreateAndInit(__deref_out FxSystemThread **SystemThread, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDFDEVICE Device, __in MdDeviceObject DeviceObject)
virtual ~FxSystemThread(VOID)
BOOLEAN ExitThread(VOID)
BOOLEAN Initialize(VOID)
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __out
Definition: dbghelp.h:62
#define FALSE
Definition: types.h:117
@ FX_TYPE_SYSTEMTHREAD
Definition: fxtypes.h:66
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
VOID UfxVerifierTrapNotImpl()
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
Definition: wdfworkitem.h:115