PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Using kIsrIsNotComplete

An ISR returning kIsrIsNotComplete produces slightly more complex behavior. An ISR returns kIsrIsNotComplete only when its device was not the device requesting service. Even though a leaf ISR was invoked, the interrupt request is still outstanding and the ISR for the requesting device must be found. If the member set containing the ISR just invoked has no dispatching modifying options, then the next interrupt member in the set will have its ISR invoked. In the current example, the ISR of IST member set D, InterruptMemberNumber 2, would be invoked. Assuming that this ISR serviced its device and returned kIsrIsComplete, dispatching would be complete since no higher interrupt set had any dispatching modifier options set.

If the ISR of IST member set D, InterruptMemberNumber 2, also returned kIsrIsNotComplete, however, the ISR of the next interrupt member in the parent set would be invoked. In the example, InterruptMemberNumber 3 of member set C is already the last member in set C, so this set is skipped and the next higher set is examined (in this case, set B). Set B is found to have higher members, resulting in the ISR of member set B, InterruptMemberNumber 3, being invoked. Assuming that this ISR serviced its device and returned kIsrIsComplete, dispatching would be finished.

The behavior just described is a classic left-branch recursive tree walk. It is employed when no means exist for directly identifying exactly which device is requesting service. Devices must be polled, by invoking their ISRs, to find and service the requesting device.

While this behavior will correctly poll for the requesting device, it is sometimes inappropriate to poll devices in the order that they appear in the member set. In the example, assume that interrupt set B has its dispatching modifier option set to reinvoke the parent ISR if kIsrIsNotComplete is returned. In the example just cited, when the traversal toward the root encounters InterruptMemberNumber 2 of member set B, the parent set member A, InterruptMemberNumber 1, has its ISR reinvoked. This ISR could then return InterruptMemberNumber 4 to invoke member set B, InterruptMemberNumber 4. In this way, kIsrIsNotComplete should be used when the priority of devices is not the same as the order in which devices appear in their member sets.


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)