OTCreateSystemTask
Allows a function to be executed at the next system task time.C INTERFACE
long OTCreateSystemTask (OTProcessProcPtr proc, void* arg)C++ INTERFACES
None. C++ applications use the C interface to this function.PARAMETERS
proc- A pointer to the process callback function you want executed at system task time.
arg- A pointer to application-defined data that Open Transport can pass to your callback function. Pass
NULLif you do not want this data passed. If you are creating more than one of the same kind of task, you can use different values forargto distinguish between the tasks.DESCRIPTION
TheOTCreateSystemTaskfunction creates a system task that you can schedule for execution at the next system task time. The task contains a pointer to the process callback function specified by theprocparameter. At the next system task time, Open Transport calls your process callback function, passing it theargparameter and, for the 68000-family of Macintosh computers only, restoring the A5 global world to what it was when you originally calledOTCreateSystemTask.This function returns a reference that you can use to identify a task in other system task functions. If the return value is 0, then there is not enough memory to allocate the necessary data.
SEE ALSO
To schedule a task for execution at system task time, call theOTScheduleSystemTaskfunction (page 7-10).To destroy a system task created with the
OTCreateSystemTaskfunction, call theOTDestroySystemTaskfunction (page 7-13).To cancel a task scheduled for execution at system task time, call the
OTCancelSystemTaskfunction (page 7-12).