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: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 23 - Programming With Open Transport Reference / Functions
Working With Deferred Tasks /


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 for arg to distinguish between the tasks.
function result
A reference that you can use to identify a task when calling the OTScheduleDeferredTask function or the OTDestroyDeferredTask function. If the return value is 0, then there is not enough memory to allocate the necessary data.
DISCUSSION
The OTCreateDeferredTask function creates a deferred task that you can schedule for execution at deferred task time using the OTScheduleDeferredTask 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 function DTInstall to create a deferred task that allows you to call Open Transport functions.

SEE ALSO
The OTScheduleDeferredTask function.

The OTDestroyDeferredTask function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998