[NTOSKRNL]
[reactos.git] / reactos / ntoskrnl / io / iomgr / adapter.c
1 /*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/io/adapter.c
5 * PURPOSE: I/O Wrappers for HAL Adapter APIs
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 * Filip Navara (navaraf@reactos.org)
8 */
9
10 /* INCLUDES *****************************************************************/
11
12 #include <ntoskrnl.h>
13 #define NDEBUG
14 #include <debug.h>
15
16 /* DATA **********************************************************************/
17
18 POBJECT_TYPE IoAdapterObjectType;
19 POBJECT_TYPE IoDeviceHandlerObjectType;
20 ULONG IoDeviceHandlerObjectSize;
21
22 /* FUNCTIONS *****************************************************************/
23
24 /*
25 * @implemented
26 */
27 NTSTATUS
28 NTAPI
29 IoAllocateAdapterChannel(IN PADAPTER_OBJECT AdapterObject,
30 IN PDEVICE_OBJECT DeviceObject,
31 IN ULONG NumberOfMapRegisters,
32 IN PDRIVER_CONTROL ExecutionRoutine,
33 IN PVOID Context)
34 {
35 PWAIT_CONTEXT_BLOCK Wcb = &DeviceObject->Queue.Wcb;
36
37 /* Initialize the WCB */
38 Wcb->DeviceObject = DeviceObject;
39 Wcb->DeviceContext = Context;
40 Wcb->CurrentIrp = DeviceObject->CurrentIrp;
41
42 /* Call HAL */
43 return HalAllocateAdapterChannel(AdapterObject,
44 Wcb,
45 NumberOfMapRegisters,
46 ExecutionRoutine);
47 }
48
49 /* EOF */