AbortIO

Aborts an I/O operation.

Synopsis

Err AbortIO( Item ior )

Description

This procedure aborts an I/O operation. If the I/O operation has already completed, calling AbortIO() has no effect. If it is not complete, it will be aborted.

A task should call WaitIO() immediately after calling AbortIO(). When WaitIO() returns, the task knows that the I/O operation is no longer active. It can then confirm that the I/O operation was aborted before it was finished by checking the io_Error field of the IOReq structure. If the operation aborted, the value of this field is ER_Aborted.

Arguments

ior
The item number of the I/O request to abort.

Return Value

The procedure returns 0 if the I/O operation was successfully aborted or an error code (a negative value) if an error occurs. Possible error codes include:

BADITEM
The ior argument is not an IOReq.
NOTOWNER
The ior argument is an IOReq but the calling task is not its owner.

Implementation

SWI implemented in kernel folio V20.

Associated Files

io.h
ANSI C Prototype

See Also

CheckIO(), CreateIOReq(), DeleteIOReq(), DoIO(), SendIO(), WaitIO()