Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Processes


Chapter 6 - Deferred Task Manager

This chapter describes how your application or device driver can use the Deferred Task Manager to defer the execution of lengthy tasks until interrupts are reenabled. Time-consuming tasks, if executed at interrupt time, can prevent the execution of interrupt tasks having the same or lower priority. The Deferred Task Manager allows you to improve interrupt handling by deferring a task until all other interrupts have been serviced.

Lengthy tasks are often initiated by slot cards. As a result, you probably need to read the information in this chapter only if your application or driver deals with slot-card interrupts. However, you can use the services provided by the Deferred Task Manager whenever you need to install a lengthy interrupt task capable of running with all interrupts enabled. You can, for example, defer the execution of completion routines, Time Manager routines, and VBL tasks.

To use this chapter, you should be familiar with interrupts and interrupt tasks in general. See the chapter "Introduction to Processes and Tasks" in this book for an overview of both interrupt and noninterrupt processing. Because the Deferred Task Manager maintains all deferred tasks in a queue until their execution, you should also be familiar with operating-system queues, as described in the chapter "Queue Utilities" in Inside Macintosh: Operating System Utilities.

This chapter begins with a description of interrupt priority levels and explains when you might need to use the Deferred Task Manager. Then it shows how you can use the Deferred Task Manager to defer a task. The chapter concludes with a description of the Deferred Task Manager's data structure and routine.


Chapter Contents
About the Deferred Task Manager
Using the Deferred Task Manager
Checking for the Deferred Task Manager
Installing a Deferred Task
Defining a Deferred Task
Deferring a Slot-Based VBL Task
Deferred Task Manager Reference
Data Structure
Deferred Task Manager Routine
Application-Defined Routine
Deferred Tasks
Summary of the Deferred Task Manager
Pascal Summary
Data Type
Deferred Task Manager Routine
Application-Defined Routine
C Summary
Data Type
Deferred Task Manager Routine
Application-Defined Routine
Assembly-Language Summary
Deferred Task Manager Queue Element
Global Variables
Result Codes


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996