OpenCBM
Functions
readwrite.c File Reference

Perform reading from and writing to the driver. More...

#include <wdm.h>
#include "cbm_driver.h"
#include "iec.h"

Go to the source code of this file.

Functions

NTSTATUS cbm_readwrite (IN PDEVICE_OBJECT Fdo, IN PIRP Irp)
 Services reads from or writes to the driver. More...
 
NTSTATUS cbm_execute_readwrite (IN PDEVICE_EXTENSION Pdx, IN PIRP Irp)
 Executes reads from or writes to the driver. More...
 

Detailed Description

Perform reading from and writing to the driver.



Author
Spiro Trikaliotis

Definition in file readwrite.c.

Function Documentation

NTSTATUS cbm_execute_readwrite ( IN PDEVICE_EXTENSION  Pdx,
IN PIRP  Irp 
)

Executes reads from or writes to the driver.

Services reads from or writes to the driver

Parameters
PdxPointer to the DEVICE_EXTENSION structure.
IrpPointer to an IRP structure that describes the requested I/O operation.
Returns
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it return one of the error status values.

This function does not perform any validity checks on the input and output buffer! This should already been done in cbm_readwrite.

Todo:
Remove this, is this does not make sense.

Definition at line 178 of file readwrite.c.

References cbmiec_raw_read(), cbmiec_raw_write(), DBG_ASSERT, DBG_ERROR, DBG_IRPPATH_EXECUTE, DBG_PREFIX, FUNC_ENTER, PERF_EVENT_READ_EXECUTE, PERF_EVENT_WRITE_EXECUTE, and QueueCompleteIrp().

Referenced by cbm_startio().

NTSTATUS cbm_readwrite ( IN PDEVICE_OBJECT  Fdo,
IN PIRP  Irp 
)

Services reads from or writes to the driver.

Services reads from or writes to the driver

Parameters
FdoPointer to a DEVICE_OBJECT structure. This is the device object for the target device, previously created by the driver's AddDevice routine.
IrpPointer to an IRP structure that describes the requested I/O operation.
Returns
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it return one of the error status values.

The driver's DriverEntry routine stored this routine's address in DriverObject->MajorFunction[IRP_MJ_READ] and DriverObject->MajorFunction[IRP_MJ_WRITE].

Generally, all Dispatch routines execute in an arbitrary thread context at IRQL PASSIVE_LEVEL, but there are exceptions.

Definition at line 84 of file readwrite.c.

References DBG_ASSERT, DBG_IRPPATH_PROCESS, FUNC_ENTER, PERF_EVENT_READ_QUEUE, PERF_EVENT_WRITE_QUEUE, QueueCompleteIrp(), and QueueStartPacket().

Referenced by DriverCommonInit().