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


Summary of the Deferred Task Manager

Pascal Summary

Data Type

TYPE DeferredTask =
   RECORD
      qLink:      QElemPtr;         {next queue entry}
      qType:      Integer;          {queue type}
      dtFlags:    Integer;          {reserved}
      dtAddr:     ProcPtr;          {pointer to task}
      dtParm:     LongInt;          {optional parameter passed in A1}
      dtReserved: LongInt;          {reserved; should be 0}
   END;

Deferred Task Manager Routine

FUNCTION DTInstall(dtTaskPtr: QElemPtr): OSErr;

Application-Defined Routine

PROCEDURE MyDeferredTask;

C Summary

Data Type

struct DeferredTask {
      QElemPtr    qLink;            /*next queue entry*/
      short       qType;            /*queue type*/
      short       dtFlags;          /*reserved*/
      ProcPtr     dtAddr;           /*pointer to task*/
      long        dtParm;           /*optional parameter passed in A1*/
      long        dtReserved;       /*reserved; should be 0*/
};

Deferred Task Manager Routine

pascal OSErr DTInstall(QElemPtr dtTaskPtr);

Application-Defined Routine

pascal void MyDeferredTask(void);

Assembly-Language Summary

Deferred Task Manager Queue Element
0qLinklongpointer to next queue entry
4qTypewordqueue type
6dtFlagswordreserved
8dtAddrlongpointer to task
12dtParmlongoptional parameter to be passed in A1
16dtReservedlongreserved; should be 0

Global Variables
DTQueue 10 bytesDeferred task queue header.
jDTInstall longJump vector for DTInstall function.

Result Codes
noErr0No error
vTypErr-2Invalid qType value (must be ORD(dtQType))


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996