Important: The information in this document is obsolete and should not be used for new development.
OTScheduleDeferredTask
Schedules a task for execution at deferred task time.C INTERFACE
Boolean OTScheduleDeferredTask(long dtCookie)C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
dtCookie
- A reference that identifies the task to be scheduled. This reference is returned by the
OTCreateDeferredTask
function used to create the task.- function result
- The result is
true
if the deferred task is scheduled successfully. If the result isfalse
and thedtCookie
parameter has a valid value (other than 0), then the task is already scheduled to run. IfdtCookie
is invalid (a value of 0), the function returnsfalse
and does nothing.DISCUSSION
TheOTScheduleDeferredTask
function schedules the task (specified by thedtCookie
parameter) for execution at the next deferred task time.You can call the
OTScheduleDeferredTask
function at any time. If you have not yet destroyed a task, you can use this function to reschedule the same task more than once.If you make multiple calls to the
OTScheduleDeferredTask
function before the task is executed, additional tasks are not scheduled; only one instance of each unique task is scheduled at a time.
- WARNING
- Open Transport does not keep track of outstanding deferred task requests. It is the caller's responsibility to ensure that all outstanding deferred task requests have either executed or have been cancelled. If this is not done, and the calling process terminates before the deferred task executes, the processor will crash when it attempts to execute the task.
SPECIAL CONSIDERATIONS
You can call this Open Transport function at interrupt time, but you must precede it by calling theOTEnterInterrupt
function, and you must follow it by calling theOTLeaveInterrupt
function.SEE ALSO
TheOTScheduleInterruptTask
function.The
OTCreateDeferredTask
function.The
OTDestroyDeferredTask
function.The
OTEnterInterrupt
function.The
OTLeaveInterrupt
function.