Important: The information in this document is obsolete and should not be used for new development.
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;TheDeferredTasksAvailable
function simply calls the functionTrapAvailable
to determine whether the trap_DTInstall
is implemented. See the chapter "Gestalt Manager" in Inside Macintosh: Operating System Utilities for a definition of theTrapAvailable
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) andjDTInstall
(containing the jump vector for theDTInstall
function) are not supported on the Macintosh Plus. You should not useDTQueue
orjDTInstall
on the Macintosh Plus.