hailongxl
驱动牛犊
驱动牛犊
  • 注册日期2006-07-15
  • 最后登录2013-02-22
  • 粉丝0
  • 关注0
  • 积分5分
  • 威望41点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2008回复:2

请教IoCompleteRequest和IoStartNextPacket调用的先后顺序问题

楼主#
更多 发布于:2012-12-15 10:27
最近学习驱动开发,看《Programming the Windows Driver Modal》一书和DDK文档上面的DpcForIsr里面都是
先调用IoStartNextPacket启动下一个IRP的StartIo处理
再调用IoCompleteRequest完成当前IRP
 
而IoStartNextPacket内部就是调用IopStartNextPacket立即开始处理下一个IRP
那么岂不是后面的IRP反而比前面的IRP先完成?
 
请前辈指教。
 
以下内容为DDK文档中DpcForIsr的Comments
 
A DpcForIsr routine is typically responsible for at least thefollowing tasks:
  • Completing the I/O operation described by the received IRP
  • Dequeuing next IRP
    If the driver uses the system-supplied IRP queue, the DcpForIsrroutine should call IoStartNextPacket or IoStartNextPacketByKey, so the driver'sStartIo routine will start processing the next I/O request.
    If the driver uses internal IRP queues, the DpcForIsr routine shoulddequeue the next IRP and begin processing for the next I/O request.
  • Setting the I/O status block in the received IRP and calling IoCompleteRequest for the completed request  

co63oc
驱动牛犊
驱动牛犊
  • 注册日期2011-09-01
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分35分
  • 威望291点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2013-01-10 11:34
一个IRP, 每个驱动都经过一次
co63oc
驱动牛犊
驱动牛犊
  • 注册日期2011-09-01
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分35分
  • 威望291点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2013-01-10 12:52
IoStartNextPacket 开始下一个IRP的一部分,IoCompleteRequest完成当前IRP,
IO管理器继续下一个IRP其他部分
游客

返回顶部