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);
static HRESULT _CreateAndInit(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _Out_ FxInterruptThreadpool **ppThreadpool)
TP_CALLBACK_ENVIRON m_CallbackEnvironment
ULONG m_MinimumThreadCount
HRESULT UpdateThreadPoolThreadLimits(_In_ ULONG InterruptCount)
FxInterruptThreadpool(PFX_DRIVER_GLOBALS FxDriverGlobals)
static HRESULT _CreateAndInit(_In_ FxInterruptThreadpool *Threadpool, _In_ FxInterrupt *Interrupt, _In_ PTP_WAIT_CALLBACK WaitCallback, _Out_ FxInterruptWaitblock **Waitblock)
VOID WaitForOutstandingCallbackToComplete(VOID)
VOID CloseThreadpoolWait(VOID)
VOID ClearThreadpoolWait(VOID)
HRESULT Initialize(__in FxInterruptThreadpool *Threadpool, __in FxInterrupt *Interrupt, __in PTP_WAIT_CALLBACK WaitCallback)
#define ERROR_NOT_ENOUGH_MEMORY
static void cleanup(void)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
FX_VERIFY(INTERNAL, CHECK_NOT_NULL(LoaderInterface->pIWudfHost))
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FX_VERIFY_WITH_NAME(DRIVER(BadArgument, TODO), CHECK(ERROR_STRING_HW_ACCESS_NOT_ALLOWED,(pDevice->IsDirectHardwareAccessAllowed()==TRUE)), DriverGlobals->DriverName)
#define MINIMUM_THREAD_COUNT_DEFAULT
#define TRACE_LEVEL_ERROR
PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
DWORD dwNumberOfProcessors
static TP_CALLBACK_ENVIRON *static PTP_WAIT_CALLBACK
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
DWORD WINAPI GetLastError(void)
#define HRESULT_FROM_WIN32(x)