2006-06-30 19:09:39 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Kernel
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
2015-10-04 11:54:25 +00:00
|
|
|
* FILE: ntoskrnl/io/iomgr/adapter.c
|
2006-06-30 19:09:39 +00:00
|
|
|
* PURPOSE: I/O Wrappers for HAL Adapter APIs
|
|
|
|
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
|
|
|
* Filip Navara (navaraf@reactos.org)
|
1998-08-25 04:27:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
2004-08-15 16:39:12 +00:00
|
|
|
#include <ntoskrnl.h>
|
2005-11-26 11:02:13 +00:00
|
|
|
#define NDEBUG
|
2008-08-30 16:31:06 +00:00
|
|
|
#include <debug.h>
|
1998-08-25 04:27:26 +00:00
|
|
|
|
2000-03-26 19:38:32 +00:00
|
|
|
/* DATA **********************************************************************/
|
|
|
|
|
2006-06-30 19:09:39 +00:00
|
|
|
POBJECT_TYPE IoAdapterObjectType;
|
|
|
|
POBJECT_TYPE IoDeviceHandlerObjectType;
|
|
|
|
ULONG IoDeviceHandlerObjectSize;
|
2000-03-26 19:38:32 +00:00
|
|
|
|
1998-08-25 04:27:26 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
2010-07-15 11:20:22 +00:00
|
|
|
#undef IoAllocateAdapterChannel
|
2003-07-10 15:47:00 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2006-06-30 19:09:39 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
IoAllocateAdapterChannel(IN PADAPTER_OBJECT AdapterObject,
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN ULONG NumberOfMapRegisters,
|
|
|
|
IN PDRIVER_CONTROL ExecutionRoutine,
|
|
|
|
IN PVOID Context)
|
1998-08-25 04:27:26 +00:00
|
|
|
{
|
2006-06-30 19:09:39 +00:00
|
|
|
PWAIT_CONTEXT_BLOCK Wcb = &DeviceObject->Queue.Wcb;
|
|
|
|
|
|
|
|
/* Initialize the WCB */
|
|
|
|
Wcb->DeviceObject = DeviceObject;
|
|
|
|
Wcb->DeviceContext = Context;
|
|
|
|
Wcb->CurrentIrp = DeviceObject->CurrentIrp;
|
|
|
|
|
|
|
|
/* Call HAL */
|
|
|
|
return HalAllocateAdapterChannel(AdapterObject,
|
|
|
|
Wcb,
|
|
|
|
NumberOfMapRegisters,
|
|
|
|
ExecutionRoutine);
|
1998-08-25 04:27:26 +00:00
|
|
|
}
|
|
|
|
|
2000-03-26 19:38:32 +00:00
|
|
|
/* EOF */
|