ReactOS 0.4.15-dev-7958-gcd0bb1a
fxinterruptthreadpoolum.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft. All rights reserved.
4
5Module Name:
6
7 FxInterruptThreadpoolUm.hpp
8
9Abstract:
10
11 This file contains the class definition for the threadpool for interrupt object.
12
13Author:
14
15
16
17Environment:
18
19 User mode only
20
21Revision History:
22
23
24
25--*/
26#pragma once
27
28#define MINIMUM_THREAD_COUNT_DEFAULT (1)
29class FxInterrupt;
30
32{
33
34private:
35
36 //
37 // Pointer to structure representing thread pool
38 //
40
41 //
42 // Structure representing callback environment for thread pool
43 //
45
46 //
47 // Minimum thread pool thread count
48 //
50
51
54 );
55
56public:
57
59 PFX_DRIVER_GLOBALS FxDriverGlobals
60 );
61
63
64 static
68 _Out_ FxInterruptThreadpool** ppThreadpool
69 );
70
73 VOID
74 )
75 {
77 }
78
79 PTP_WAIT
83 )
84 {
85 return ::CreateThreadpoolWait(pfnwa, Context, &m_CallbackEnvironment);
86 }
87
90 _In_ ULONG InterruptCount
91 );
92};
93
95{
96
97private:
98
99 //
100 // threadpool wait block
101 //
102 PTP_WAIT m_Wait;
103
104 //
105 // auto reset event
106 //
108
109
110 HRESULT
112 __in FxInterruptThreadpool* Threadpool,
114 __in PTP_WAIT_CALLBACK WaitCallback
115 );
116
117public:
118
119 static
120 HRESULT
122 _In_ FxInterruptThreadpool* Threadpool,
124 _In_ PTP_WAIT_CALLBACK WaitCallback,
125 _Out_ FxInterruptWaitblock** Waitblock
126 );
127
129 PFX_DRIVER_GLOBALS FxDriverGlobals
130 ) :
131 FxGlobalsStump(FxDriverGlobals),
132 m_Wait(NULL),
134 {
135 }
136
138
139 VOID
141 VOID
142 )
143 {
145 }
146
147 VOID
149 VOID
150 )
151 {
152 //
153 // associates event with wait block and queues it
154 // to thread pool queue.
155 //
157 }
158
159 VOID
161 VOID
162 )
163 {
164 //
165 // Passing a NULL handle clears the wait
166 //
168 }
169
170 VOID
172 VOID
173 )
174 {
175 ::WaitForThreadpoolWaitCallbacks(m_Wait, FALSE);
176 }
177
178 HANDLE
180 VOID
181 )
182 {
183 return m_Event;
184 }
185
186 VOID
188 VOID
189 )
190 {
192 }
193
194};
195
static HRESULT _CreateAndInit(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _Out_ FxInterruptThreadpool **ppThreadpool)
TP_CALLBACK_ENVIRON m_CallbackEnvironment
PTP_CALLBACK_ENVIRON GetCallbackEnvironment(VOID)
PTP_WAIT CreateThreadpoolWait(__in PTP_WAIT_CALLBACK pfnwa, __inout_opt PVOID Context)
HRESULT UpdateThreadPoolThreadLimits(_In_ ULONG InterruptCount)
static HRESULT _CreateAndInit(_In_ FxInterruptThreadpool *Threadpool, _In_ FxInterrupt *Interrupt, _In_ PTP_WAIT_CALLBACK WaitCallback, _Out_ FxInterruptWaitblock **Waitblock)
FxInterruptWaitblock(PFX_DRIVER_GLOBALS FxDriverGlobals)
#define __inout_opt
Definition: dbghelp.h:53
#define __in
Definition: dbghelp.h:35
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
DriverGlobals
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
static TP_CALLBACK_ENVIRON *static PTP_WAIT_CALLBACK
Definition: threadpool.c:27
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
Definition: wdfinterrupt.h:379
struct _TP_POOL * PTP_POOL
Definition: winnt_old.h:4451
static void Initialize()
Definition: xlate.c:212