Important: The information in this document is obsolete and should not be used for new development.
MyCompletionRoutine
You can provide a completion routine for a PPC Toolbox routine that you execute asynchronously.
PROCEDURE MyCompletionRoutine (pb: PPCParamBlockPtr);
pb
- A pointer to the PPC parameter block passed to the PPC Toolbox function.
DESCRIPTION
If you specify a completion routine in theioCompletion
field of a PPC parameter block, it is called at interrupt time when the PPC Toolbox routine completes execution. The PPC Toolbox passes to your completion routine a pointer to the same PPC parameter block that your application passed to the PPC Toolbox routine.
- WARNING
- Completion routines execute at the interrupt level and must preserve all registers other than A0, A1, and D0-D2. (Note that MPW C and MPW Pascal do this automatically.) Your completion routine must not make any calls to the Memory Manager, directly or indirectly, and it can't depend on the validity of handles to unlocked blocks. The PPC Toolbox preserves the application global register A5.
SEE ALSO
For examples of completion routines, see Listing 11-9 on page 11-37, Listing 11-11 on page 11-38, and Listing 11-13 on page 11-39.