Important: The information in this document is obsolete and should not be used for new development.
OTCreateSystemTask
Creates a reference to a task that can later be scheduled to run at system task time.C INTERFACE
long OTCreateSystemTask(OTProcessProcPtr proc, void* arg)C++ INTERFACE
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 context pointer for your use. Open Transport simply passes the value as the original to the procedure specified by the
proc
parameter. PassNULL
if you do not want any data passed. If you are creating more than one of the same kind of task, you can use different values forarg
to distinguish between the tasks.- function result
- A reference that should be used when scheduling or destroying the task. A value of 0 indicates that there is not enough memory to allocate the necessary data.
DISCUSSION
TheOTCreateSystemTask
function creates a system task that you can schedule for execution at system task time using theOTScheduleSystemTask
function. The task gets a pointer to the callback function specified by theproc
parameter, and its argument specified by thearg
parameter. (For 68000 code, when Open Transport executes the callback function, it restores the A5 global world to what it was when you originally called theOTCreateSystemTask
function.)It is important that you call the function
OTDestroySystemTask
when you are done with processing your system tasks. Open Transport does not automatically deallocate the memory and resources used to schedule system tasks when you close Open Transportjuok.
- IMPORTANT
- Never pass a universal procedure pointer as the
proc
parameter for this call.SEE ALSO
TheOTScheduleSystemTask
function.The
OTDestroySystemTask
function.The
OTCancelSystemTask
function.