chapter 8.7: 完成I/O请求

当驱动完成了I/O请求,设置status,传输的number of bytes,发起请求线程的priority boost
下表是WDF驱动可以调用的完成方法(UMDF的接口为IWDFIoRequest)

Action

UMDF method

KMDF method

Completes an I/O request with status and the default priority boost.

Complete

WdfRequestComplete

Completes an I/O request with status, the number of bytes transferred, and the default priority boost.

CompleteWithInformation

WdfRequestCompleteWithInformation

Completes an I/O request with status, number of bytes transferred, and priority boost.

None

WdfRequestCompleteWithPriorityBoost

create,cleanup,close可以用第一个,而读,写和大多数IOCTL请求(有data)可以用后两个。
priority boost 是用来增加等待I/O请求完成或接受请求的结果的线程的运行优先级。若不指定priority boost,framework根据设备类型使用默认值。
先cleanup,再complete,最后删除request对象。
不要在占有锁时调用任何I/O完成方法,容易死锁。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值