27 #include "FxInterruptThreadpoolUm.hpp" 30 #include "FxInterruptThreadpoolUm.tmh" 79 "FxInterruptThreadpool creation failed, " 115 "Threadpool creation failed, %!winerr!",
error);
163 SetThreadpoolThreadMaximum(
m_Pool, 1);
177 "%!FUNC!: Failed to set minimum threads (%d) in threadpool," 205 ULONG minThreadCount = 0;
230 minThreadCount =
min(InterruptCount, procs);
236 bRet = SetThreadpoolThreadMinimum(
m_Pool, minThreadCount);
242 "Failed to set minimum threads in threadpool," 243 " TP_POOL 0x%p to %d %!winerr!",
m_Pool, minThreadCount,
254 SetThreadpoolThreadMaximum(
m_Pool, InterruptCount);
258 "Threads in thread pool TP_POOL 0x%p updated" 259 " to Max %d Min %d threads",
m_Pool,
260 InterruptCount, minThreadCount);
312 FX_VERIFY(INTERNAL, CHECK_NOT_NULL(Waitblock));
314 driverGlobals =
Interrupt->GetDriverGlobals();
320 if (waitblock ==
NULL) {
324 "Waitblock creation failed %!hresult!",
hr);
332 *Waitblock = waitblock;
337 "Waitblock init failed %!hresult!",
hr);
374 "Event creation failed for FxInterrupt object" 375 " %!winerr!",
error);
383 m_Wait = Threadpool->CreateThreadpoolWait(WaitCallback,
390 "Event creation failed for FxInterrupt object" 391 " %!winerr!",
error);
ULONG m_MinimumThreadCount
#define HRESULT_FROM_WIN32(x)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
static HRESULT _CreateAndInit(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _Out_ FxInterruptThreadpool **ppThreadpool)
#define ERROR_NOT_ENOUGH_MEMORY
DWORD WINAPI GetLastError(VOID)
static HRESULT _CreateAndInit(_In_ FxInterruptThreadpool *Threadpool, _In_ FxInterrupt *Interrupt, _In_ PTP_WAIT_CALLBACK WaitCallback, _Out_ FxInterruptWaitblock **Waitblock)
FX_VERIFY_WITH_NAME(DRIVER(BadArgument, TODO), CHECK(ERROR_STRING_HW_ACCESS_NOT_ALLOWED,(pDevice->IsDirectHardwareAccessAllowed()==TRUE)), DriverGlobals->DriverName)
FxInterruptWaitblock(PFX_DRIVER_GLOBALS FxDriverGlobals)
HRESULT Initialize(__in FxInterruptThreadpool *Threadpool, __in FxInterrupt *Interrupt, __in PTP_WAIT_CALLBACK WaitCallback)
VOID WaitForOutstandingCallbackToComplete(VOID)
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
HRESULT UpdateThreadPoolThreadLimits(_In_ ULONG InterruptCount)
#define TRACE_LEVEL_ERROR
TP_CALLBACK_ENVIRON m_CallbackEnvironment
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
#define MINIMUM_THREAD_COUNT_DEFAULT
DWORD dwNumberOfProcessors
char * cleanup(char *str)
static TP_CALLBACK_ENVIRON *static PTP_WAIT_CALLBACK
FxInterruptThreadpool(PFX_DRIVER_GLOBALS FxDriverGlobals)
VOID CloseThreadpoolWait(VOID)
VOID ClearThreadpoolWait(VOID)
PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)