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 / Using the Deferred Task Manager


Checking for the Deferred Task Manager

The Deferred Task Manager was introduced primarily to allow slot handlers to defer lengthy processing initiated by a slot interrupt and, until system software version 7.0, was not available on all computers running the Macintosh Operating System. For example, the Deferred Task Manager is not available on Macintosh Plus or Macintosh SE computers running system software version 6.0. In addition, there is no support for the Deferred Task Manager in versions of A/UX earlier than version 3.0.

As a result, you should always make sure that the Deferred Task Manager is available in the current operating environment before attempting to use it. You can use the function DeferredTasksAvailable, defined in Listing 6-1, to do this.

Listing 6-1 Checking for the availability of the Deferred Task Manager

FUNCTION DeferredTasksAvailable: Boolean;
CONST
   _DTInstall = $A082;
BEGIN
   DeferredTasksAvailable := TrapAvailable(_DTInstall);
END;
The DeferredTasksAvailable function simply calls the function TrapAvailable to determine whether the trap _DTInstall is implemented. See the chapter "Gestalt Manager" in Inside Macintosh: Operating System Utilities for a definition of the TrapAvailable function.

System software versions 7.0 and later support the Deferred Task Manager on all Macintosh computers, including the Macintosh Plus and Macintosh SE. However, the system global variables DTQueue (containing the address of the deferred task queue header) and jDTInstall (containing the jump vector for the DTInstall function) are not supported on the Macintosh Plus. You should not use DTQueue or jDTInstall on the Macintosh Plus.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996