Cancel Logic in Windows Drivers

This paper provides information about writing drivers for the Microsoft Windows family of operating systems. It provides guidelines for driver writers to determine when support for IRP cancellation is required and how to implement it properly.

File name: cancel_logic.doc

164 KB

Microsoft Word file

Get Office File Viewers

click here to download

This paper provides information about writing drivers for the Microsoft Windows family of operating systems. It provides guidelines for driver writers to determine when support for IRP cancellation is required and how to implement it properly.

Included in this paper:

  • When Must a Driver Support IRP Cancellation?
  • Cancel Logic with the Cancel Spin Lock
  • Cancel Logic with a Driver-Supplied Lock
  • Cancel-Safe IRP Queues
  • How Cancel-Safe IRP Queues Work
  • Availability of Cancel-Safe IRP Queuing Routines
  • Cancel Logic with StartIo, IoStartPacket, and IoStartNextPacket
  • Tips for Writing Cancel Routines
  • Cancel Routines in Drivers that Hold IRPs Indefinitely
  • Cancel Routines that Search for IRPs in Queues
  • Avoiding Race Conditions
  • Testing for Errors
  • Call to Action and Resources

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft