Important: The information in this document is obsolete and should not be used for new development.
DTInstall
After defining the fields of a deferred task record, you can call theDTInstall
function to install the record into the deferred task queue.
FUNCTION DTInstall (dtTaskPtr: QElemPtr): OSErr;
dtTaskPtr
- A pointer to a queue element to add to the deferred task queue.
DESCRIPTION
TheDTInstall
function adds the specified task record to the deferred task queue. Your application should fill in all fields of the task record exceptqLink
andqFlags
.Ordinarily, you call
DTInstall
only at interrupt time. TheDTInstall
function does not actually execute the routine specified in thedtAddr
field of the task record. Each system interrupt handler executes routines stored in the deferred task queue after reenabling interrupts. After a routine in the queue is executed, it is removed from the deferred task queue.If the
qType
field of the task record is not set toORD(dtQType)
,DTInstall
returnsvTypErr
and does not add the record to the queue. Otherwise,DTInstall
returnsnoErr
.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forDTInstall
are
Registers on entry A0 Pointer to new queue entry
Registers on exit D0 Result code To reduce overhead at interrupt time, instead of executing the
DTInstall
trap, you can load the jump vectorjDTInstall
into an address register other than A0 and execute aJSR
instruction using that register.RESULT CODES
noErr 0 No error vTypErr -2 Invalid qType
value (must beORD(dtQType)
)