Important: The information in this document is obsolete and should not be used for new development.
OTCreateDeferredTask
Creates a reference to a task that can be scheduled to run at deferred task time.C INTERFACE
long OTCreateDeferredTask(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 deferred task time.
arg
- A context pointer for your use. Pass
NULL
if 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 forarg
to distinguish between the tasks.- function result
- A reference that you can use to identify a task when calling the
OTScheduleDeferredTask
function or theOTDestroyDeferredTask
function. If the return value is 0, then there is not enough memory to allocate the necessary data.DISCUSSION
TheOTCreateDeferredTask
function creates a deferred task that you can schedule for execution at deferred task time using theOTScheduleDeferredTask
function.If you want to call Open Transport from an interrupt, you can use this function (and
OTScheduleDeferredTask
) instead of the standard Deferred Task Manager functionDTInstall
to create a deferred task that allows you to call Open Transport functions.SEE ALSO
TheOTScheduleDeferredTask
function.The
OTDestroyDeferredTask
function.