求翻译:

StartIo Routines in Lowest-Level Drivers
The I/O manager's call to a driver's dispatch routine is the first stage in satisfying a device I/O request. The StartIo routine is the second stage. Every device driver with a StartIo routine is likely to call IoStartPacket from its DispatchRead and DispatchWrite routines, and usually for a subset of the I/O control codes it supports in its DispatchDeviceControl routine. The IoStartPacket routine adds the IRP to the device's system-supplied device queue or, if the queue is empty, immediately calls the driver's StartIo routine to process the IRP.
You can assume that when a driver's StartIo routine is called, the target device is not busy. This is because the I/O manager calls StartIo under two circumstances; either one of the driver's dispatch routines has just called IoStartPacket and the device queue was empty, or the driver's DpcForIsr routine is completing another request and has just called IoStartNextPacket to dequeue the next IRP.
Before the StartIo routine in a highest-level device driver is called, that driver's dispatch routine should have probed and locked down the user buffer, if necessary, to set up valid mapped buffer addresses in the IRP queued to its StartIo routine. If a highest-level device driver sets up its device objects for direct I/O (or for neither buffered nor direct I/O), the driver cannot defer locking down a user buffer to its StartIo routine; every StartIo routine is called in an arbitrary thread context at IRQL = DISPATCH_LEVEL.
Note Any buffer memory to be accessed by a driver's StartIo routine must be locked down or allocated from resident, system-space memory and must be accessible in an arbitrary thread context.
In general, any lower-level device driver's StartIo routine is responsible for calling IoGetCurrentIrpStackLocation with the input IRP and then doing whatever request-specific processing is necessary to start the I/O operation on its device. Request-specific processing can include the following:
• Setting up or updating any state information about the current request that the driver maintains. The state information might be stored in the device extension of the target device object or elsewhere in nonpaged pool allocated by the driver.
For example, if a device driver maintains an InterruptExpected Boolean for the current transfer operation, its StartIo routine might set this variable to TRUE. If the driver
For example, if a device driver maintains an InterruptExpected Boolean for the current transfer operation, its StartIo routine might set this variable to TRUE. If the driver maintains a time-out counter for the current operation, its StartIo routine might set up this value, or the StartIo routine might queue the driver's CustomTimerDpc routine. If the StartIo routine shares access to state information or hardware resources with other driver routines, the state information or resource must be protected by a spin lock. (See Spin Locks.)

startio例程在最低级别的司机

输入输出管理器的调用一个驾驶员调度程序的第一阶段是在满足一个输入/输出设备的要求。该startio例行二期。每一个设备驱动程序与startio例程可能称iostartpacket从dispatchread和dispatchwrite例程,和通常的一个子集的输入/输出控制代码,它支持在其dispatchdevicecontrol例程。该iostartpacket常规加技术的设备的设备或系统提供队列,如果队列为空,立即要求司机的startio常规处理技术。

你可以假设,当驾驶员的startio例程被调用,目标设备不忙。这是因为我/澳经理要求下startio情况;要么一个司机的调度程序就称为iostartpacket和设备队列为空,或驾驶dpcforisr例行完成另一个请求,就称为iostartnextpacket出列的未来规划。

在startio例程中最高级别的设备驱动程序调用,司机的调度程序应探索和锁定用户缓冲区,如果有必要,建立有效的缓冲区地址映射在专家小组的日常startio排队。如果一个最高级别的设备驱动程序建立设备对象直接输入/输出(或没有缓冲或直接输入/输出),司机不能延迟锁定用户缓冲区的startio常规;每一startio例程调用的线程上下文在= dispatch_level进行如下。

注意任何缓冲区内存访问的驾驶startio例程必须被锁定或分配的驻地,system-space记忆和必须可在任意线程上下文。

一般来说,任何较低级别的设备驱动程序的startio日常负责召集iogetcurrentirpstacklocation与输入与做任何请求特定处理是必要的启动输入/输出操作的装置。请求特定的处理可以包括以下:

•建立或更新任何国家有关当前请求的信息,司机坚持。状态信息可以被存储在设备的目标设备对象或其他非分页池分配的驱动程序。

例如,如果一个驱动程序保持interruptexpected布尔的电流传输操作,其startio例程可能设置这个变量来实现。如果司机

例如,如果一个驱动程序保持interruptexpected布尔的电流传输操作,其startio例程可能设置这个变量来实现。如果司机保持超时计数器的当前操作,其startio例行可能设置此值,或startio例程可能队列司机的customtimerdpc例程。如果startio例行股获得状态信息或硬件资源与其他驱动程序,状态信息或资源必须得到保护的一个自旋锁。(参见
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-04-18
像是API的说明书。
第2个回答  2012-04-21
si a my wps
第3个回答  2012-04-18
mm

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网