NetBSD/lib/librt/aio_cancel.3

91 lines
2.8 KiB
Groff
Raw Normal View History

.\" $NetBSD: aio_cancel.3,v 1.5 2010/09/15 07:28:46 yamt Exp $
.\"
.\" Copyright (c) 1999 Softweyr LLC.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL Softweyr LLC OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_cancel.2,v 1.22 2003/01/13 10:37:11 tjr Exp $
.\"
.Dd May 17, 2010
.Dt AIO_CANCEL 3
.Os
.Sh NAME
.Nm aio_cancel
.Nd cancel an outstanding asynchronous I/O operation (REALTIME)
.Sh LIBRARY
.Lb librt
.Sh SYNOPSIS
.In aio.h
.Ft int
.Fn aio_cancel "int fildes" "struct aiocb * aiocbp"
.Sh DESCRIPTION
The
.Fn aio_cancel
system call cancels the outstanding asynchronous
I/O request for the file descriptor specified in
.Fa fildes .
If
.Fa aiocbp
is specified, only that specific asynchronous I/O request is cancelled.
.Pp
Normal asynchronous notification occurs for cancelled requests.
Requests complete with an error result of
.Er ECANCELED .
.Sh RETURN VALUES
The
.Fn aio_cancel
system call returns \-1 to indicate an error, or one of the following:
.Bl -tag -width Er
.It Bq Dv AIO_CANCELED
All outstanding requests meeting the criteria specified were cancelled.
.It Bq Dv AIO_NOTCANCELED
Some requests were not cancelled, status for the requests should be
checked with
.Xr aio_error 3 .
.It Bq Dv AIO_ALLDONE
All of the requests meeting the criteria have finished.
.El
.Sh ERRORS
An error return from
.Fn aio_cancel
indicates:
.Bl -tag -width Er
.It Bq Er EBADF
The
.Fa fildes
argument is an invalid file descriptor.
.El
.Sh SEE ALSO
.Xr aio 3
.Sh STANDARDS
The
.Fn aio_cancel
system call is expected to conform to the
.St -p1003.1-2001
standard.
.Sh HISTORY
The
.Fn aio_cancel
system call first appeared in
.Nx 5.0 .