Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 4 - SCSI Manager 4.3 / SCSI Manager 4.3 Reference
SCSI Manager 4.3 Functions / Client Functions


SCSIAbortCommand

You can use the SCSIAbortCommand 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.
-->scsiPBLengthUInt16The size of the parameter block.
-->scsiFunctionCodeUInt8The SCSIAbortCommand function selector code (0x10).
<--scsiResultOSErrThe returned result code.
-->scsiDeviceDeviceIdentThe device identification record.
-->scsiCompletionCallbackProcA pointer to a completion routine.
If this field is set to nil, the function is executed synchronously.
-->scsiDriverStorageUInt8 *Optional pointer to the device driver's private storage.
-->scsiIOptrSCSI_IO *A pointer to the SCSI I/O parameter block to be canceled.

DESCRIPTION
The SCSIAbortCommand function cancels the SCSIExecIO request identified by the scsiIOptr 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 of scsiRequestAborted. If the request has already been started, the SIM attempts to send an ABORT message to the device, either by asserting the /ATN signal or by reselecting the device. The function returns the scsiUnableToAbort result code if the specified request has already been completed.

SPECIAL CONSIDERATIONS
Because the interrupt that calls the completion routine can pre-empt the SCSIAbortCommand request, this function can produce unexpected results if the completion routine for the canceled request reuses the parameter block.

RESULT CODES
noErr0No error
scsiBusInvalid-7869The bus ID is invalid
scsiRequestInvalid-7870The parameter block request is invalid
scsiPBLengthError-7872The parameter block is too small for this SIM
scsiQLinkInvalid-7881The qLink field was not 0
scsiUnableToAbort-7933Unable to abort parameter block request
SEE ALSO
See the description of the SCSITerminateIO function on page 4-48 for information about another method of canceling a request.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996