29#define FIRST_USER_QUEUE_HANDLE 5
30#define MAX_USER_QUEUE_HANDLES 124
32#define WAIT_ITEM_KEY_MASK (0x82000000)
33#define SCHEDULED_ITEM_KEY_MASK (0x80000000)
65 0, 0, { (
DWORD_PTR)(__FILE__
": queues_section") }
225 if (--
entry->refcount == 0)
250 IRtwqAsyncCallback_AddRef(iface);
322 unsigned int max_thread,
i;
347 FIXME(
"RTWQ_WINDOW_WORKQUEUE is not supported.\n");
367 RTWQASYNCRESULT *
result = (RTWQASYNCRESULT *)
item->result;
375 IRtwqAsyncCallback_Invoke(
result->pCallback,
item->reply_result ?
item->reply_result :
item->result);
377 IUnknown_Release(&
item->IUnknown_iface);
385 if (
item->priority == 0)
387 else if (
item->priority < 0)
393 env.FinalizationCallback =
item->finalization_callback;
396 if (
item->finalization_callback)
397 IUnknown_AddRef(&
item->IUnknown_iface);
441 IUnknown_Release(&
item->IUnknown_iface);
488 WARN(
"Failed to create reply object, hr %#lx.\n",
hr);
507 IUnknown_Release(&
head->IUnknown_iface);
514 IUnknown_AddRef(&
item->IUnknown_iface);
540 IUnknown_AddRef(iface);
573 if (
item->reply_result)
574 IRtwqAsyncResult_Release(
item->reply_result);
575 IRtwqAsyncResult_Release(
item->result);
599 IRtwqAsyncResult_AddRef(
item->result);
632 return RTWQ_E_SHUTDOWN;
657 desc.target_queue = 0;
668 return *
ret ?
S_OK : RTWQ_E_INVALID_WORKQUEUE;
682 IUnknown_Release(&
item->IUnknown_iface);
716 RTWQASYNCRESULT *result_data = (RTWQASYNCRESULT *)
result;
720 if (
FAILED(IRtwqAsyncCallback_GetParameters(result_data->pCallback, &
flags, &
queue)))
746 IUnknown_Release(&
item->IUnknown_iface);
757 TRACE(
"result object %p.\n",
item->result);
761 IUnknown_Release(&
item->IUnknown_iface);
769 TRACE(
"result object %p.\n",
item->result);
774 IUnknown_Release(&
item->IUnknown_iface);
781 TRACE(
"result object %p.\n",
item->result);
785 IUnknown_Release(&
item->IUnknown_iface);
792 TRACE(
"result object %p.\n",
item->result);
797 IUnknown_Release(&
item->IUnknown_iface);
804 IUnknown_AddRef(&
item->IUnknown_iface);
808 IUnknown_Release(&
item->IUnknown_iface);
818 IUnknown_AddRef(&
item->IUnknown_iface);
902 IUnknown_AddRef(&
item->IUnknown_iface);
925 WARN(
"Unknown item key mask %#I64x.\n",
key);
935 IRtwqAsyncResult_SetStatus(
item->result, RTWQ_E_OPERATION_CANCELLED);
938 IUnknown_Release(&
item->IUnknown_iface);
940 IUnknown_Release(&
item->IUnknown_iface);
946 return RTWQ_E_NOT_FOUND;
958 return RTWQ_E_SHUTDOWN;
976 WARN(
"Out of user queue handles.\n");
985 *queue_id = (
idx << 16) |
entry->generation;
1013 IRtwqAsyncResult_AddRef(iface);
1041 if (
result->result.pCallback)
1042 IRtwqAsyncCallback_Release(
result->result.pCallback);
1044 IUnknown_Release(
result->object);
1046 IUnknown_Release(
result->state);
1047 if (
result->result.hEvent)
1067 IUnknown_AddRef(*
state);
1076 TRACE(
"%p.\n", iface);
1078 return result->result.hrStatusResult;
1096 TRACE(
"%p, %p.\n", iface,
object);
1101 *
object =
result->object;
1102 IUnknown_AddRef(*
object);
1111 TRACE(
"%p.\n", iface);
1144 IUnknown_AddRef(
result->object);
1146 if (
result->result.pCallback)
1147 IRtwqAsyncCallback_AddRef(
result->result.pCallback);
1150 IUnknown_AddRef(
result->state);
1154 TRACE(
"Created async result object %p.\n", *
out);
1197 WARN(
"Failed to initialize MTA, hr %#lx.\n",
hr);
1201 desc.target_queue = 0;
1230 WARN(
"Failed to uninitialize MTA, hr %#lx.\n",
hr);
1301 IRtwqAsyncCallback_AddRef(iface);
1343 WARN(
"Expected object to be set for result object.\n");
1366 if (!(
object =
calloc(1,
sizeof(*
object))))
1370 object->refcount = 1;
1373 *
out = &
object->IRtwqAsyncCallback_iface;
1402 IRtwqAsyncResult_Release(
result);
1405 *
key = workitem_key;
1458 desc.target_queue = 0;
1507 if (!*usageclass && taskid)
1511 FIXME(
"Class name is ignored.\n");
1521 desc.target_queue = 0;
1617 FIXME(
"%#lx, %s, %lu, %ld, %p, %p.\n",
queue,
debugstr_w(
class), taskid,
priority,
callback,
state);
COMPILER_DEPENDENT_INT64 INT64
struct outqueuenode * head
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
static LPCWSTR LPCWSTR LPCWSTR env
static HINSTANCE instance
HRESULT WINAPI CoIncrementMTAUsage(CO_MTA_USAGE_COOKIE *cookie)
HRESULT WINAPI CoDecrementMTAUsage(CO_MTA_USAGE_COOKIE cookie)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
PTP_POOL WINAPI DECLSPEC_HOTPATCH CreateThreadpool(void *reserved)
PTP_WAIT WINAPI DECLSPEC_HOTPATCH CreateThreadpoolWait(PTP_WAIT_CALLBACK callback, PVOID userdata, TP_CALLBACK_ENVIRON *environment)
PTP_TIMER WINAPI DECLSPEC_HOTPATCH CreateThreadpoolTimer(PTP_TIMER_CALLBACK callback, PVOID userdata, TP_CALLBACK_ENVIRON *environment)
PTP_CLEANUP_GROUP WINAPI DECLSPEC_HOTPATCH CreateThreadpoolCleanupGroup(void)
PTP_WORK WINAPI DECLSPEC_HOTPATCH CreateThreadpoolWork(PTP_WORK_CALLBACK callback, PVOID userdata, TP_CALLBACK_ENVIRON *environment)
static ULONG WINAPI queue_serial_callback_Release(IRtwqAsyncCallback *iface)
static HRESULT alloc_user_queue(const struct queue_desc *desc, DWORD *queue_id)
HRESULT WINAPI RtwqSetDeadline2(DWORD queue_id, LONGLONG deadline, LONGLONG predeadline, HANDLE *request)
@ RTWQ_CALLBACK_QUEUE_MULTITHREADED
@ RTWQ_CALLBACK_QUEUE_LONG_FUNCTION
@ RTWQ_CALLBACK_QUEUE_TIMER
@ RTWQ_CALLBACK_QUEUE_UNDEFINED
@ RTWQ_CALLBACK_QUEUE_PRIVATE_MASK
@ RTWQ_CALLBACK_QUEUE_STANDARD
@ RTWQ_CALLBACK_QUEUE_ALL
static ULONG WINAPI periodic_callback_Release(IRtwqAsyncCallback *iface)
static LONG next_item_key
static ULONG WINAPI work_item_Release(IUnknown *iface)
static struct work_item * work_item_impl_from_IUnknown(IUnknown *iface)
HRESULT WINAPI RtwqGetWorkQueueMMCSSPriority(DWORD queue, LONG *priority)
static HRESULT WINAPI periodic_callback_QueryInterface(IRtwqAsyncCallback *iface, REFIID riid, void **obj)
static HRESULT WINAPI queue_serial_callback_QueryInterface(IRtwqAsyncCallback *iface, REFIID riid, void **obj)
static BOOL queue_release_pending_item(struct work_item *item)
static HRESULT grab_queue(DWORD queue_id, struct queue **ret)
static struct queue_handle * get_queue_obj(DWORD handle)
static void pool_queue_submit(struct queue *queue, struct work_item *item)
#define FIRST_USER_QUEUE_HANDLE
static const IUnknownVtbl work_item_vtbl
HRESULT WINAPI RtwqCancelWorkItem(RTWQWORKITEM_KEY key)
HRESULT WINAPI RtwqUnjoinWorkQueue(DWORD queue, HANDLE cookie)
static void CALLBACK standard_queue_worker(TP_CALLBACK_INSTANCE *instance, void *context, TP_WORK *work)
static WORD queue_generation
static ULONG WINAPI async_result_Release(IRtwqAsyncResult *iface)
static HRESULT create_periodic_callback_obj(RTWQPERIODICCALLBACK callback, IRtwqAsyncCallback **out)
static HRESULT queue_cancel_item(struct queue *queue, RTWQWORKITEM_KEY key)
static void queue_mark_item_pending(DWORD mask, struct work_item *item, RTWQWORKITEM_KEY *key)
static void shutdown_system_queues(void)
static LONG platform_lock
HRESULT WINAPI RtwqCancelDeadline(HANDLE request)
static void CALLBACK standard_queue_cleanup_callback(void *object_data, void *group_data)
HRESULT WINAPI RtwqInvokeCallback(IRtwqAsyncResult *result)
HRESULT WINAPI RtwqAllocateSerialWorkQueue(DWORD target_queue, DWORD *queue)
HRESULT WINAPI RtwqPutWorkItem(DWORD queue, LONG priority, IRtwqAsyncResult *result)
HRESULT WINAPI RtwqPutWaitingWorkItem(HANDLE event, LONG priority, IRtwqAsyncResult *result, RTWQWORKITEM_KEY *key)
static HRESULT WINAPI async_result_GetObject(IRtwqAsyncResult *iface, IUnknown **object)
HRESULT WINAPI RtwqUnregisterPlatformFromMMCSS(void)
static const struct queue_ops pool_queue_ops
HRESULT WINAPI RtwqRegisterPlatformEvents(IRtwqPlatformEvents *events)
static HRESULT invoke_async_callback(IRtwqAsyncResult *result)
static void CALLBACK waiting_item_cancelable_callback(TP_CALLBACK_INSTANCE *instance, void *context, TP_WAIT *wait, TP_WAIT_RESULT wait_result)
static CO_MTA_USAGE_COOKIE mta_cookie
static ULONG WINAPI queue_serial_callback_AddRef(IRtwqAsyncCallback *iface)
static CRITICAL_SECTION_DEBUG queues_critsect_debug
#define MAX_USER_QUEUE_HANDLES
#define WAIT_ITEM_KEY_MASK
static void CALLBACK scheduled_item_callback(TP_CALLBACK_INSTANCE *instance, void *context, TP_TIMER *timer)
static struct queue_handle user_queues[MAX_USER_QUEUE_HANDLES]
static HRESULT create_async_result(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **out)
static const struct queue_ops serial_queue_ops
static struct work_item * serial_queue_is_ack_token(struct queue *queue, struct work_item *item)
static void init_system_queues(void)
static HRESULT queue_put_work_item(DWORD queue_id, LONG priority, IRtwqAsyncResult *result)
static void CALLBACK scheduled_item_cancelable_callback(TP_CALLBACK_INSTANCE *instance, void *context, TP_TIMER *timer)
HRESULT WINAPI RtwqRegisterPlatformWithMMCSS(const WCHAR *class, DWORD *taskid, LONG priority)
static HRESULT queue_submit_timer(struct queue *queue, IRtwqAsyncResult *result, INT64 timeout, DWORD period, RTWQWORKITEM_KEY *key)
static void CALLBACK periodic_item_callback(TP_CALLBACK_INSTANCE *instance, void *context, TP_TIMER *timer)
static BOOL serial_queue_shutdown(struct queue *queue)
HRESULT WINAPI RtwqUnlockPlatform(void)
static RTWQWORKITEM_KEY generate_item_key(DWORD mask)
static struct work_item * alloc_work_item(struct queue *queue, LONG priority, IRtwqAsyncResult *result)
static const IRtwqAsyncCallbackVtbl queue_serial_callback_vtbl
static ULONG WINAPI work_item_AddRef(IUnknown *iface)
#define SCHEDULED_ITEM_KEY_MASK
static ULONG WINAPI periodic_callback_AddRef(IRtwqAsyncCallback *iface)
static IUnknown *WINAPI async_result_GetStateNoAddRef(IRtwqAsyncResult *iface)
static HRESULT WINAPI queue_serial_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result)
HRESULT WINAPI RtwqAddPeriodicCallback(RTWQPERIODICCALLBACK callback, IUnknown *context, DWORD *key)
HRESULT WINAPI RtwqRemovePeriodicCallback(DWORD key)
static const IRtwqAsyncResultVtbl async_result_vtbl
static RTWQWORKITEM_KEY get_item_key(DWORD mask, DWORD key)
static HRESULT unlock_user_queue(DWORD queue)
static void CALLBACK waiting_item_callback(TP_CALLBACK_INSTANCE *instance, void *context, TP_WAIT *wait, TP_WAIT_RESULT wait_result)
static HRESULT schedule_work_item(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key)
static HRESULT WINAPI queue_serial_callback_GetParameters(IRtwqAsyncCallback *iface, DWORD *flags, DWORD *queue_id)
static void init_work_queue(const struct queue_desc *desc, struct queue *queue)
HRESULT WINAPI RtwqEndRegisterWorkQueueWithMMCSS(IRtwqAsyncResult *result, DWORD *taskid)
HRESULT WINAPI RtwqUnregisterPlatformEvents(IRtwqPlatformEvents *events)
HRESULT WINAPI RtwqSetDeadline(DWORD queue_id, LONGLONG deadline, HANDLE *request)
static struct async_result * impl_from_IRtwqAsyncResult(IRtwqAsyncResult *iface)
static HRESULT WINAPI periodic_callback_Invoke(IRtwqAsyncCallback *iface, IRtwqAsyncResult *result)
static CRITICAL_SECTION queues_section
static HRESULT queue_submit_item(struct queue *queue, LONG priority, IRtwqAsyncResult *result)
HRESULT WINAPI RtwqStartup(void)
HRESULT WINAPI RtwqGetWorkQueueMMCSSClass(DWORD queue, WCHAR *class, DWORD *length)
HRESULT WINAPI RtwqShutdown(void)
static const IRtwqAsyncCallbackVtbl periodic_callback_vtbl
static HRESULT WINAPI work_item_QueryInterface(IUnknown *iface, REFIID riid, void **obj)
HRESULT WINAPI RtwqEndUnregisterWorkQueueWithMMCSS(IRtwqAsyncResult *result)
static DWORD shared_mt_queue
HRESULT WINAPI RtwqCreateAsyncResult(IUnknown *object, IRtwqAsyncCallback *callback, IUnknown *state, IRtwqAsyncResult **out)
static struct queue_handle * next_free_user_queue
HRESULT WINAPI RtwqLockPlatform(void)
static BOOL pool_queue_shutdown(struct queue *queue)
static HRESULT WINAPI async_result_GetState(IRtwqAsyncResult *iface, IUnknown **state)
HRESULT WINAPI RtwqAllocateWorkQueue(RTWQ_WORKQUEUE_TYPE queue_type, DWORD *queue)
static struct queue_handle * next_unused_user_queue
static void shutdown_queue(struct queue *queue)
static HRESULT lock_user_queue(DWORD queue)
HRESULT WINAPI RtwqSetLongRunning(DWORD queue_id, BOOL enable)
static ULONG WINAPI async_result_AddRef(IRtwqAsyncResult *iface)
static struct work_item * serial_queue_get_next(struct queue *queue, struct work_item *item)
@ RTWQ_LOCALIZE_REMOTE_CALLBACK
@ RTWQ_FAST_IO_PROCESSING_CALLBACK
HRESULT WINAPI RtwqGetWorkQueueMMCSSTaskId(DWORD queue, DWORD *taskid)
HRESULT WINAPI RtwqJoinWorkQueue(DWORD queue, HANDLE hFile, HANDLE *cookie)
HRESULT WINAPI RtwqBeginRegisterWorkQueueWithMMCSS(DWORD queue, const WCHAR *class, DWORD taskid, LONG priority, IRtwqAsyncCallback *callback, IUnknown *state)
static void serial_queue_submit(struct queue *queue, struct work_item *item)
static struct queue * queue_impl_from_IRtwqAsyncCallback(IRtwqAsyncCallback *iface)
static HRESULT WINAPI async_result_QueryInterface(IRtwqAsyncResult *iface, REFIID riid, void **obj)
static HRESULT WINAPI async_result_SetStatus(IRtwqAsyncResult *iface, HRESULT status)
HRESULT WINAPI RtwqScheduleWorkItem(IRtwqAsyncResult *result, INT64 timeout, RTWQWORKITEM_KEY *key)
static HRESULT WINAPI periodic_callback_GetParameters(IRtwqAsyncCallback *iface, DWORD *flags, DWORD *queue)
HRESULT WINAPI RtwqLockSharedWorkQueue(const WCHAR *usageclass, LONG priority, DWORD *taskid, DWORD *queue)
HRESULT WINAPI RtwqLockWorkQueue(DWORD queue)
static HRESULT WINAPI async_result_GetStatus(IRtwqAsyncResult *iface)
static HRESULT serial_queue_init(const struct queue_desc *desc, struct queue *queue)
static struct periodic_callback * impl_from_IRtwqAsyncCallback(IRtwqAsyncCallback *iface)
static void CALLBACK serial_queue_finalization_callback(PTP_CALLBACK_INSTANCE instance, void *user_data)
@ SYS_QUEUE_LONG_FUNCTION
@ SYS_QUEUE_MULTITHREADED
static HRESULT pool_queue_init(const struct queue_desc *desc, struct queue *queue)
HRESULT WINAPI RtwqBeginUnregisterWorkQueueWithMMCSS(DWORD queue, IRtwqAsyncCallback *callback, IUnknown *state)
static struct queue system_queues[SYS_QUEUE_COUNT]
static struct queue * get_system_queue(DWORD queue_id)
HRESULT WINAPI RtwqUnlockWorkQueue(DWORD queue)
static HRESULT queue_submit_wait(struct queue *queue, HANDLE event, LONG priority, IRtwqAsyncResult *result, RTWQWORKITEM_KEY *key)
_In_ uint64_t _In_ uint64_t _In_ uint64_t generation
GLuint GLsizei GLsizei * length
const GLuint const GLclampf * priorities
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define InterlockedExchangeAdd
static IPrintDialogCallback callback
D3D11_SHADER_VARIABLE_DESC desc
#define IsEqualIID(riid1, riid2)
@ RTWQ_MULTITHREADED_WORKQUEUE
@ RTWQ_STANDARD_WORKQUEUE
unsigned __int64 RTWQWORKITEM_KEY
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
LIST_ENTRY ProcessLocksList
PTP_CLEANUP_GROUP CleanupGroup
TP_CALLBACK_PRIORITY CallbackPriority
union _TP_CALLBACK_ENVIRON_V3::@4726 u
struct _TP_CALLBACK_ENVIRON_V3::@4726::@4727 s
RTWQPERIODICCALLBACK callback
IRtwqAsyncCallback IRtwqAsyncCallback_iface
RTWQ_WORKQUEUE_TYPE queue_type
const struct queue_ops * ops
HRESULT(* init)(const struct queue_desc *desc, struct queue *queue)
BOOL(* shutdown)(struct queue *queue)
void(* submit)(struct queue *queue, struct work_item *item)
struct list pending_items
IRtwqAsyncCallback IRtwqAsyncCallback_iface
PTP_SIMPLE_CALLBACK finalization_callback
TP_CALLBACK_ENVIRON_V3 envs[ARRAY_SIZE(priorities)]
const struct queue_ops * ops
PTP_SIMPLE_CALLBACK finalization_callback
IRtwqAsyncResult * reply_result
IRtwqAsyncResult * result
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
WINBASEAPI VOID WINAPI WaitForThreadpoolTimerCallbacks(_Inout_ PTP_TIMER pti, _In_ BOOL fCancelPendingCallbacks)
WINBASEAPI VOID WINAPI CloseThreadpoolWork(_Inout_ PTP_WORK pwk)
WINBASEAPI VOID WINAPI CloseThreadpoolTimer(_Inout_ PTP_TIMER pti)
WINBASEAPI VOID WINAPI SetThreadpoolTimer(_Inout_ PTP_TIMER pti, _In_opt_ PFILETIME pftDueTime, _In_ DWORD msPeriod, _In_opt_ DWORD msWindowLength)
WINBASEAPI VOID WINAPI SubmitThreadpoolWork(_Inout_ PTP_WORK pwk)
WINBASEAPI BOOL WINAPI SetThreadpoolThreadMinimum(_Inout_ PTP_POOL ptpp, _In_ DWORD cthrdMic)
WINBASEAPI VOID WINAPI SetThreadpoolWait(_Inout_ PTP_WAIT pwa, _In_opt_ HANDLE h, _In_opt_ PFILETIME pftTimeout)
WINBASEAPI VOID WINAPI CloseThreadpool(_Inout_ PTP_POOL ptpp)
WINBASEAPI VOID WINAPI CloseThreadpoolWait(_Inout_ PTP_WAIT pwa)
WINBASEAPI VOID WINAPI WaitForThreadpoolWaitCallbacks(_Inout_ PTP_WAIT pwa, _In_ BOOL fCancelPendingCallbacks)
WINBASEAPI VOID WINAPI CloseThreadpoolCleanupGroupMembers(_Inout_ PTP_CLEANUP_GROUP ptpcg, _In_ BOOL fCancelPendingCallbacks, _Inout_opt_ PVOID pvCleanupContext)
WINBASEAPI VOID WINAPI SetThreadpoolThreadMaximum(_Inout_ PTP_POOL ptpp, _In_ DWORD cthrdMost)
#define CONTAINING_RECORD(address, type, field)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
@ TP_CALLBACK_PRIORITY_NORMAL
@ TP_CALLBACK_PRIORITY_HIGH
@ TP_CALLBACK_PRIORITY_LOW
VOID(NTAPI * PTP_WAIT_CALLBACK)(PTP_CALLBACK_INSTANCE, PVOID, PTP_WAIT, TP_WAIT_RESULT)
struct _TP_CALLBACK_INSTANCE * PTP_CALLBACK_INSTANCE
enum _TP_CALLBACK_PRIORITY TP_CALLBACK_PRIORITY
struct _TP_TIMER TP_TIMER
VOID(NTAPI * PTP_SIMPLE_CALLBACK)(_Inout_ PTP_CALLBACK_INSTANCE Instance, _Inout_opt_ PVOID Context)
VOID(NTAPI * PTP_TIMER_CALLBACK)(PTP_CALLBACK_INSTANCE, PVOID, PTP_TIMER)
struct _TP_CALLBACK_INSTANCE TP_CALLBACK_INSTANCE