MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / loaderQueueInitialize

Function loaderQueueInitialize

loader/windows/src/Queue.c:42–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40#endif
41
42NTSTATUS
43loaderQueueInitialize(_In_ WDFDEVICE Device)
44/*++
45
46Routine Description:
47
48 The I/O dispatch callbacks for the frameworks device object
49 are configured in this function.
50
51 A single default I/O Queue is configured for parallel request
52 processing, and a driver context memory allocation is created
53 to hold our structure QUEUE_CONTEXT.
54
55Arguments:
56
57 Device - Handle to a framework device object.
58
59Return Value:
60
61 VOID
62
63--*/
64{
65 WDFQUEUE queue;
66 NTSTATUS status;
67 WDF_IO_QUEUE_CONFIG queueConfig;
68
69 PAGED_CODE();
70
71 //
72 // Configure a default queue so that requests that are not
73 // configure-fowarded using WdfDeviceConfigureRequestDispatching to goto
74 // other queues get dispatched here.
75 //
76 WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&queueConfig, WdfIoQueueDispatchParallel);
77
78 queueConfig.EvtIoDeviceControl = loaderEvtIoDeviceControl;
79 queueConfig.EvtIoStop = loaderEvtIoStop;
80
81 status = WdfIoQueueCreate(Device, &queueConfig, WDF_NO_OBJECT_ATTRIBUTES, &queue);
82
83 if (!NT_SUCCESS(status)) {
84 TraceEvents(TRACE_LEVEL_ERROR, TRACE_QUEUE, "WdfIoQueueCreate failed %!STATUS!", status);
85 return status;
86 }
87
88 return status;
89}
90
91VOID
92loaderEvtIoDeviceControl(

Callers 1

loaderCreateDeviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected