## Physical Device Driver Reference

[prev][next][parent][TOC]

### Interrupt During START

If the request is staged on an interrupt, then ABIOS sets the return code appropriately only when the particular service is ready to be resumed through the Advanced BIOS interrupt routine. The device driver strategy routine must also set a flag to indicate whether a request has completed the Start request to the point at which the strategy routine interrogates the return code. This must be done to accommodate the case where the interrupt occurs after ABIOS updates the return code but before the device driver strategy routine interrogates the return code. In this case, the device driver interrupt handler is invoked by the interrupt and can take appropriate action on the request block, even though the device driver strategy routine has not completed processing the request block.

For example, if the strategy routine is expected to block the request until the interrupt occurs, but the interrupt handler is invoked before the strategy routine is able to block, the interrupt handler needs to flag the fact that the interrupt handler has already processed the request block. The strategy routine, when it gets control, should not check the return code in the request block. The starting routine does not have to block, because the request is already completed. It then sets up the request packet with the return information and returns the completed request to the kernel.

This example would be more complex if, when the strategy routine got control, the request was still incomplete (as would occur in a multistaged request). The strategy routine would ignore the return code because the request block would already be at a different stage than the start, but it might still have to block.