Important: The information in this document is obsolete and should not be used for new development.
OTScheduleInterruptTask
Schedules a task for execution at hardware interrupt time.C INTERFACE
Boolean OTScheduleInterruptTask(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, which you use to create the task.- function result
- The result is
true
if the deferred task is scheduled. If it returnsfalse
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
TheOTScheduleInterruptTask
function schedules the task associated with thedtCookie
parameter for execution at deferred task time.This function calls theOTEnterInterrupt
and theOTLeaveInterrupt
functions, so you do not need to make separate calls to those functions when calling theOTScheduleInterruptTask
function.The
OTScheduleInterruptTask
function behaves exactly like the functionOTScheduleDeferredTask
. You should call it instead of calling theOTScheduleDeferredTask
function if you are calling from hardware interrupt time.When Open Transport calls your callback function, it passes it the
arg
parameter you specified when you created the task. (For 68000 code, Open Transport also restores the A5 global world to what it was when you originally calledOTCreateDeferredTask
.)You can call this function any time. If you have not yet destroyed a task, you can use this function to reschedule it multiple times.
If you make multiple calls to the
OTScheduleInterruptTask
function before the task is executed, additional tasks are not scheduled; only one instance of each unique task will be scheduled at a time.If you want to call Open Transport from an interrupt, you can use this function (and the
OTCreateDeferredTask
function) instead of the standard Deferred Task Manager functionDTInstall
to create a deferred task that permits you to call Open Transport functions. This allows Open Transport to adapt to changes in the underlying operating system without affecting your code.
- 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 hardware interrupt time without calling theOTEnterInterrupt
function first and theOTLeaveInterrupt
function afterward.SEE ALSO
TheOTCreateDeferredTask
function.The
OTDestroyDeferredTask
function.