ReactOS 0.4.15-dev-5667-ged97270
mxworkitemkm.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5ModuleName:
6
7 MxWorkItemKm.h
8
9Abstract:
10
11 Kernel mode implementation of work item
12 class defined in MxWorkItem.h
13
14Author:
15
16
17
18Revision History:
19
20
21
22--*/
23
24#pragma once
25
26typedef IO_WORKITEM_ROUTINE MX_WORKITEM_ROUTINE, *PMX_WORKITEM_ROUTINE;
28
29#include "mxworkitem.h"
30
31__inline
33 )
34{
36}
37
39__inline
43 __in_opt PVOID ThreadPoolEnv
44 )
45{
46 UNREFERENCED_PARAMETER(ThreadPoolEnv);
47
49 if (NULL == m_WorkItem) {
51 }
52
53 return STATUS_SUCCESS;
54}
55
56__inline
57VOID
61 )
62{
68 );
69}
70
71__inline
74 )
75{
76 return m_WorkItem;
77}
78
79__inline
80VOID
83 )
84{
86}
87
88__inline
89VOID
91 )
92{
93 if (NULL != m_WorkItem) {
96 }
97}
98
99//
100// FxAutoWorkitem
101//
102__inline
104 )
105{
106 this->Free();
107}
108
109
LONG NTSTATUS
Definition: precomp.h:26
__inline MxWorkItem()
Definition: mxworkitemkm.h:32
__inline MdWorkItem GetWorkItem()
Definition: mxworkitemkm.h:73
__inline VOID Enqueue(__in PMX_WORKITEM_ROUTINE Callback, __in PVOID Context)
Definition: mxworkitemkm.h:58
static __inline VOID _Free(__in MdWorkItem Item)
Definition: mxworkitemkm.h:81
__inline VOID Free()
Definition: mxworkitemkm.h:90
MdWorkItem m_WorkItem
Definition: mxworkitem.h:32
_Must_inspect_result_ __inline NTSTATUS Allocate(__in MdDeviceObject DeviceObject, __in_opt PVOID ThreadPoolEnv=NULL)
Definition: mxworkitemkm.h:41
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define NULL
Definition: types.h:112
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
Definition: iowork.c:40
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
Definition: iowork.c:75
#define _Must_inspect_result_
Definition: ms_sal.h:558
IO_WORKITEM_ROUTINE * PMX_WORKITEM_ROUTINE
Definition: mxworkitemkm.h:26
PIO_WORKITEM MdWorkItem
Definition: mxworkitemkm.h:27
IO_WORKITEM_ROUTINE MX_WORKITEM_ROUTINE
Definition: mxworkitemkm.h:26
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_SUCCESS
Definition: shellext.h:65
__inline ~MxAutoWorkItem()
Definition: mxworkitemkm.h:103
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
@ DelayedWorkQueue
Definition: extypes.h:190