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 / Deferred Task Manager Reference
Application-Defined Routine / Deferred Tasks


A deferred task has the following syntax:

PROCEDURE MyDeferredTask;
The dtAddr field of a deferred task record contains the address of a procedure that is executed at the end of a hardware interrupt cycle when all interrupts are reenabled.

Because the deferred task is executed during a hardware interrupt cycle, it should not allocate, move, or purge memory (either directly or indirectly) and should not depend on the validity of handles to unlocked blocks.

If a deferred task uses application global variables, it must ensure that register A5 contains the address of the boundary between the application global variables and application parameters. For details, see the discussion of setting up and restoring the A5 register in the chapter "Memory Management Utilities" in Inside Macintosh: Memory.

A deferred task should avoid accessing system global variables or calling a trap that would access one.

When the deferred task is called, register A1 contains the value of the dtParm field in the deferred task record passed to DTInstall.

A deferred task must preserve all registers other than A0-A3 and D0-D3.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996