xref: /illumos-gate/usr/src/man/man3c/aiocancel.3c (revision e3ae4b35c024af1196582063ecee3ab79367227d)
te
Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
AIOCANCEL 3C "Feb 5, 1997"
NAME
aiocancel - cancel an asynchronous operation
SYNOPSIS

#include <sys/asynch.h>

int aiocancel(aio_result_t *resultp);
DESCRIPTION

aiocancel() cancels the asynchronous operation associated with the result buffer pointed to by resultp. It may not be possible to immediately cancel an operation which is in progress and in this case, aiocancel() will not wait to cancel it.

Upon successful completion, aiocancel() returns 0 and the requested operation is cancelled. The application will not receive the SIGIO completion signal for an asynchronous operation that is successfully cancelled.

RETURN VALUES

Upon successful completion, aiocancel() returns 0. Upon failure, aiocancel() returns -1 and sets errno to indicate the error.

ERRORS

aiocancel() will fail if any of the following are true: EACCES

The parameter resultp does not correspond to any outstanding asynchronous operation, although there is at least one currently outstanding.

EFAULT

resultp points to an address outside the address space of the requesting process. See NOTES.

EINVAL

There are not any outstanding requests to cancel.

ATTRIBUTES

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level Safe
SEE ALSO

aioread (3C), aiowait (3C), attributes (7)

NOTES

Passing an illegal address as resultp will result in setting errno to EFAULT only if it is detected by the application process.