1.\" $NetBSD: aio_cancel.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $ 2.\" 3.\" Copyright (c) 1999 Softweyr LLC. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``AS IS'' AND 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL Softweyr LLC OR CONTRIBUTORS BE LIABLE 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_cancel.2,v 1.22 2003/01/13 10:37:11 tjr Exp $ 28.\" 29.Dd May 17, 2010 30.Dt AIO_CANCEL 3 31.Os 32.Sh NAME 33.Nm aio_cancel 34.Nd cancel an outstanding asynchronous I/O operation (REALTIME) 35.Sh LIBRARY 36.Lb librt 37.Sh SYNOPSIS 38.In aio.h 39.Ft int 40.Fn aio_cancel "int fildes" "struct aiocb * aiocbp" 41.Sh DESCRIPTION 42The 43.Fn aio_cancel 44system call cancels the outstanding asynchronous 45I/O request for the file descriptor specified in 46.Fa fildes . 47If 48.Fa aiocbp 49is specified, only that specific asynchronous I/O request is cancelled. 50.Pp 51Normal asynchronous notification occurs for cancelled requests. 52Requests complete with an error result of 53.Er ECANCELED . 54.Sh RESTRICTIONS 55The 56.Fn aio_cancel 57system call does not cancel asynchronous I/O requests for raw disk devices. 58The 59.Fn aio_cancel 60system call will always return 61.Dv AIO_NOTCANCELED 62for file descriptors associated with raw disk devices. 63.Sh RETURN VALUES 64The 65.Fn aio_cancel 66system call returns \-1 to indicate an error, or one of the following: 67.Bl -tag -width Er 68.It Bq Dv AIO_CANCELED 69All outstanding requests meeting the criteria specified were cancelled. 70.It Bq Dv AIO_NOTCANCELED 71Some requests were not cancelled, status for the requests should be 72checked with 73.Xr aio_error 3 . 74.It Bq Dv AIO_ALLDONE 75All of the requests meeting the criteria have finished. 76.El 77.Sh ERRORS 78An error return from 79.Fn aio_cancel 80indicates: 81.Bl -tag -width Er 82.It Bq Er EBADF 83The 84.Fa fildes 85argument is an invalid file descriptor. 86.El 87.Sh SEE ALSO 88.Xr aio 3 89.Sh STANDARDS 90The 91.Fn aio_cancel 92system call is expected to conform to the 93.St -p1003.1-2001 94standard. 95.Sh HISTORY 96The 97.Fn aio_cancel 98system call first appeared in 99.Nx 5.0 . 100