Amd64/misc 64bit fixes (#236)
[reactos.git] / drivers / network / ndis / ndis / workitem.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS NDIS library
4 * FILE: workitem.c
5 * PURPOSE: Implements the NDIS 6.0 work item interface
6 * PROGRAMMERS: Cameron Gutman (aicommander@gmail.com)
7 */
8
9 #include "ndissys.h"
10
11 NDIS_HANDLE
12 EXPORT
13 NdisAllocateIoWorkItem(
14 IN NDIS_HANDLE NdisObjectHandle)
15 {
16 PLOGICAL_ADAPTER Adapter = NdisObjectHandle;
17
18 return IoAllocateWorkItem(Adapter->NdisMiniportBlock.PhysicalDeviceObject);
19 }
20
21 VOID
22 EXPORT
23 NdisQueueIoWorkItem(
24 IN NDIS_HANDLE NdisIoWorkItemHandle,
25 IN NDIS_IO_WORKITEM_ROUTINE Routine,
26 IN PVOID WorkItemContext)
27 {
28 PNDIS_IO_WORKITEM WorkItem = NdisIoWorkItemHandle;
29
30 IoQueueWorkItem(WorkItem,
31 Routine,
32 DelayedWorkQueue,
33 WorkItemContext);
34 }
35
36 VOID
37 EXPORT
38 NdisFreeIoWorkItem(
39 IN NDIS_HANDLE NdisIoWorkItemHandle)
40 {
41 PNDIS_IO_WORKITEM WorkItem = NdisIoWorkItemHandle;
42 IoFreeWorkItem(WorkItem);
43 }