Device Driver Execution Contexts
As explained in
Noninterrupt and Interrupt-Level Execution, code in PCI-based Macintosh computers may run in any of three execution contexts:
-
Hardware interrupt level is the execution context provided to a device driver's interrupt handler. Hardware interrupts occur as a direct result of a hardware interrupt requests. Page faults are not allowed at this context. Hardware interrupt level is also known as
primary interrupt level.
-
Secondary interrupt level is the execution context similar in concept to the previous Mac OS deferred task environment, which allows drivers to defer complex processing in order to minimize interrupt latency. Page faults are not allowed at this context.
-
Noninterrupt level, usually called
task level,
is the context where all other code is executed. Page faults are allowed at this context.
Additional information about interrupts contexts can be found in Technote 1104, "Interrupt-Safe Routines." Technotes are available on the Developer CD and at the Apple Developer web site.
Note
Many device driver services are available in only one or two of the execution contexts just listed. It is the responsibility of the driver writer to conform to these limitations. Drivers that violate them will not work with future releases of Mac OS. For lists of service availability, see
Service Limitations.
© 1999 Apple Computer, Inc. (Last Updated 26 March 99)