| |
| | The Windows Driver Model Simplifies Management of Device Driver I/O Requests MSJ, January 1999 |
 | | This prevents the extremely unlikely scenario in which between releasing the cancel spinlock and acquiring the local spinlock, the IRP in question is removed from the queue, completed, reallocated, reinserted back onto the same queue, and then cancelled, resulting in two threads in IrpCancelRoutine that will complete the same IRP. |
 | | Your local spinlock is the only thing preventing the IRP from being freed between the time EnqueueIrp sets the cancel routine and the time it checks the Cancel flag (or between checking the Cancel flag and queuing the IRP, depending on your implementation). |
 | | If a function is not an ISR or a DPC, and it does not execute while holding a spinlock (it is not called from code that holds a spinlock and does not acquire a spinlock itself), then you can make your driver a better citizen by making that function pageable. |
| www.microsoft.com /msj/0199/windowsdriver/windowsdriver.aspx (4891 words) |
|