OSStatus CheckpointIO(
IOPreparationID theIOPreparation,
IOCheckpointOptions theOptions);
typedef OptionBits IOPreparationOptions;
enum{
kNextIOIsInput = 0x00000001,
kNextIOIsOutput = 0x00000002,
kMoreIOTransfers = 0x00000004
};
CheckpointIO performs the necessary follow-up operations for a device I/O transfer and optionally prepares for a new transfer or reclaims the system resources associated with memory preparation. To reclaim resources, CheckpointIO should be called even if the I/O operation was abandoned.
Mac OS supports multiple concurrent preparations of memory ranges or portions of memory ranges. In this case, cache actions are appropriate and individual pages are not unlocked until all transactions have been finalized.
The theIOPreparation parameter is the IOPreparationID value for the I/O operation, as returned by a previous call to PrepareMemoryForIO. This ID is not valid following CheckpointIO if the kMoreTransfers option is omitted.
The Options parameter specifies optional operations. Values for this field are the following:
The IOPreparationTable must remain allocated until the last CheckPointIO is called.
CheckpointIO may be called from task level or secondary interrupt level but not from hardware interrupt level.