Important: The information in this document is obsolete and should not be used for new development.
OTScheduleSystemTask
Schedules a task for execution at system task time.C INTERFACE
Boolean OTScheduleSystemTask(long stCookie)C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
stCookie
- A reference that identifies the task to be scheduled.
- function result
- A result of
true
means that the system task is scheduled to run. If the function returnsfalse
and thestCookie
parameter has a valid value (i.e. other than 0), then the task is already scheduled to run. IfstCookie
is invalid (a value of 0), the function returnsfalse
and does nothing.DISCUSSION
TheOTScheduleSystemTask
function schedules for execution at system task time the task associated with thestCookie
parameter, which is a reference to a system task created by theOTCreateSystemTask
function.You can call this function at any time. If you have not yet destroyed a task, you can use this function to reschedule the same task again once it has executed. If you have canceled a task, you can use this function to schedule it again.
If you make multiple calls to the
OTScheduleSystemTask
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 system task requests. It is the caller's responsibility to ensure that all outstanding system task requests have either executed or have been cancelled. If this is not done, and the calling process terminates before the system task executes, the processor will crash when it attempts to execute the task.
SPECIAL CONSIDERATIONS
You can call this Open Transport function at hardware interrupt time, but you must precede it by calling theOTEnterInterrupt
function and you must follow it by calling theOTLeaveInterrupt
function.SEE ALSO
TheOTCreateSystemTask
function.The
OTDestroySystemTask
function.The
OTCancelSystemTask
function.The
OTEnterInterrupt
function.The
OTLeaveInterrupt
function.