Important: The information in this document is obsolete and should not be used for new development.
SCSIAbortCommand
You can use theSCSIAbortCommand
function to cancel an I/O request.
OSErr SCSIAction(SCSIAbortCommandPB *scsiPB);
- scsiPB
- A pointer to a SCSI abort command parameter block, which is described on page 4-33.
--> scsiPBLength UInt16 The size of the parameter block. --> scsiFunctionCode UInt8 The SCSIAbortCommand
function selector code (0x10).<-- scsiResult OSErr The returned result code. --> scsiDevice DeviceIdent The device identification record. --> scsiCompletion CallbackProc A pointer to a completion routine.
If this field is set tonil
, the function is executed synchronously.--> scsiDriverStorage UInt8 * Optional pointer to the device driver's private storage. --> scsiIOptr SCSI_IO * A pointer to the SCSI I/O parameter block to be canceled. DESCRIPTION
TheSCSIAbortCommand
function cancels theSCSIExecIO
request identified by thescsiIOptr
field. If the request has not yet been delivered to the device, it is removed from the queue and its completion routine is called with a result code ofscsiRequestAborted
. If the request has already been started, the SIM attempts to send anABORT
message to the device, either by asserting the /ATN signal or by reselecting the device. The function returns thescsiUnableToAbort
result code if the specified request has already been completed.SPECIAL CONSIDERATIONS
Because the interrupt that calls the completion routine can pre-empt theSCSIAbortCommand
request, this function can produce unexpected results if the completion routine for the canceled request reuses the parameter block.RESULT CODES
noErr 0 No error scsiBusInvalid -7869 The bus ID is invalid scsiRequestInvalid -7870 The parameter block request is invalid scsiPBLengthError -7872 The parameter block is too small for this SIM scsiQLinkInvalid -7881 The qLink
field was not 0scsiUnableToAbort -7933 Unable to abort parameter block request SEE ALSO
See the description of theSCSITerminateIO
function on page 4-48 for information about another method of canceling a request.