Handling IRPs 6: Asynchronous I/O Responses
来源:互联网 发布:金蝶软件连接数据库 编辑:程序博客网 时间:2024/05/16 10:31
Asynchronous I/OResponses
A driver should return STATUS_PENDING from a dispatch routine when it cannot complete an I/O request synchronously in a timely manner. Understanding when to return STATUS_PENDING is a problem for many driver writers.
A driver must return STATUS_PENDING if:
· Its dispatch routine for an IRP might return before the IRP is completed.
· It completes the IRP on another thread.
· The dispatch routine cannot determine the IRP’s completion status before it returns.
The driver must call the IoMarkIrpPending macro before it releases control of the IRP and before it returns STATUS_PENDING.IoMarkIrpPending sets the SL_PENDING_RETURNED bit in the Control field of the current I/O stack location. Each time an I/O stack location is completed, the I/O Manager copies the value of this bit to theIrp->PendingReturned field in the IRP header, as Figure 5 shows.
Figure 5. Propagating the pending bit
In Figure 5, Driver C’s call to theIoMarkIrpPending macro sets the SL_PENDING_RETURNED bit in the Control field of Driver C’s I/O stack location. When Driver C completes the IRP, the I/O Manager changes the IRP stack pointer to point to driver B and propagates the value of the SL_PENDING_RETURNED bit to thePendingReturned field in the IRP header.
- Handling IRPs 6: Asynchronous I/O Responses
- Handling IRPs 7: IoCompletion Routines and Asynchronous I/O Responses
- Handling IRPs 5: Synchronous I/O Responses
- handling IRPs 16: Debugging I/O Problems
- handling IRPs 13: I/O Control Codes (IOCTLs)
- Handling IRPs: Definition 1: IRP as a Container for an I/O Request
- asynchronous i/o
- Asynchronous I/O 是什么?
- handling IRPs 15: Building IRPs
- Handling IRPs: Introduction
- Handling IRPs 10: Optimizations
- oracle 中的 asynchronous I/O
- Synchronous and Asynchronous I/O
- Asynchronous Android读书笔记四Asynchronous I/O with Loader
- AIX 5.3 AIO (Asynchronous I/O) Tuning
- glibc2.9 中的 Asynchronous I/O
- libaio-0.3.109 中的 Asynchronous I/O
- libaio 的 Asynchronous I/O 测试代码
- 开发者所需要知道的iOS7 SDK新特性
- Handling IRPs 5: Synchronous I/O Responses
- 访问存储设备
- [黑马程序员]对两个整数变量的值进行交换的方法总结
- 自动构建 msbuild基础
- Handling IRPs 6: Asynchronous I/O Responses
- WPA Supplicant 在Windows下的编译
- JAVA I/O(一) File类
- Ubuntu 安装 sublime text 2
- Delphi7怎么样调用系统语音库 .
- Handling IRPs 7: IoCompletion Routines and Asynchronous I/O Responses
- Handling IRPs 8: Propagating the Pending Bit
- 解决flex4 spark 找不到外观错误
- FastReport的使用