PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

CheckpointIO

OSStatus CheckpointIO(
                     IOPreparationID theIOPreparation,
                     IOCheckpointOptions theOptions);
--> theIOPreparation
Value from the IOPreparationID field in the IOPreparationTable structure.
--> theOptions
Options value, as defined in OptionBits.
typedef OptionBits IOPreparationOptions;
enum{
    kNextIOIsInput          = 0x00000001,
    kNextIOIsOutput         = 0x00000002,
    kMoreIOTransfers        = 0x00000004
};
DESCRIPTION

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:

kNextIOIsInput
Data will be moved into main memory.
kNextIOIsOutput
Data will be moved out of main memory.
kMoreIOTransfers
Further I/O transfers will occur to or from the buffer. If kMoreIOTransfers is omitted, the buffer is allowed to page and IOPreparationID is invalidated.

The IOPreparationTable must remain allocated until the last CheckPointIO is called.

EXECUTION CONTEXT

CheckpointIO may be called from task level or secondary interrupt level but not from hardware interrupt level.

RESULT CODES
noErr 0 No error
paramErr -50 Bad parameter

© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)