diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2000-03-21 11:21:19 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2000-03-21 11:21:19 +0000 |
| commit | 67be10ef7337a64ee97b673e2b4bb337b1913471 (patch) | |
| tree | 82451a607e3a72ea5ddd8be48f0d0f2abc350746 /lib/libc/sys | |
| parent | ce7d1eb4914acc59f7408e0f17f0ae69d18869c9 (diff) | |
Notes
Diffstat (limited to 'lib/libc/sys')
| -rw-r--r-- | lib/libc/sys/Makefile.inc | 2 | ||||
| -rw-r--r-- | lib/libc/sys/aio_cancel.2 | 67 |
2 files changed, 50 insertions, 19 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index ebca7ed86fe5..37d42bbf547a 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -75,7 +75,7 @@ ${SPSEUDOR}: .if ${LIB} == "c" MAN2+= _exit.2 accept.2 access.2 acct.2 adjtime.2 \ aio_cancel.2 aio_error.2 aio_read.2 aio_return.2 \ - aio_suspend.2 aio_write.2 \ + aio_suspend.2 aio_waitcomplete.2 aio_write.2 \ bind.2 brk.2 chdir.2 chflags.2 \ chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 \ connect.2 dup.2 execve.2 \ diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libc/sys/aio_cancel.2 index 275c3eb7b486..edec2e93e654 100644 --- a/lib/libc/sys/aio_cancel.2 +++ b/lib/libc/sys/aio_cancel.2 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 1999 +.Dd January 19, 2000 .Dt AIO_CANCEL 2 .Os .Sh NAME @@ -33,21 +33,41 @@ .Sh SYNOPSIS .Fd #include <aio.h> .Ft int -.Fn aio_cancel "int something" "struct aiocb * iocb" +.Fn aio_cancel "int fildes" "struct aiocb * iocb" .Sh DESCRIPTION The .Fn aio_cancel -function is supposed to cancel the specified outstanding asynchronous -I/O request. +function cancels the outstanding asynchronous +I/O request for the file descriptor specified in +.Ar fildes . +If +.Ar iocb +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 +.Dv ECANCELED . +.Sh RESTRICTIONS +The +.Fn aio_cancel +function does not cancel asynchronous I/O requests for raw disk devices. The .Fn aio_cancel -is not implemented at this time, and always fails returning -.Dv ENOSYS . +function will always return +.Dv AIO_NOTCANCELED +for file descriptors associated with raw disk devices. .Sh RETURN VALUES -When +The .Fn aio_cancel -inevitably fails, it returns -.Dv ENOSYS -to signify it is not supported. +function returns -1 to indicate an error, or one of the following: +.Bl -tag -width Dv +.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 aio_error(2). +.It Bq Dv AIO_ALLDONE +All of the requests meeting the criteria have finished. +.El .Sh SEE ALSO .Xr aio_error 2 , .Xr aio_read 2 , @@ -55,24 +75,35 @@ to signify it is not supported. .Xr aio_suspend 2 , .Xr aio_write 2 . .Sh ERRORS -The +An error return from .Fn aio_cancel -function currently always fails, due to: +indicates: .Bl -tag -width Er -.It Bq Er ENOSYS -this operation is not implemented at this time. +.It Bq Er EBADF +.Ar fildes +is an invalid file descriptor. .El .Sh STANDARDS -.Nm -fails to conform to the +The +.Fn aio_cancel +function is expected to conform to the .St -p1003.2 standard. .Sh HISTORY The -.Nm +.Fn aio_cancel function first appeared in .Fx 3.0 . +The first functional implemenation of +.Fn aio_cancel +appeared in +.Fx 4.0 . .Sh AUTHORS This -manual page was written by +manual page was originally written by .An Wes Peters Aq wes@softweyr.com . +.An Christopher M Sedore Aq cmsedore@maxwell.syr.edu +updated it when +.Fn aio_cancel +was implemented for FreeBSD 4.0. + |
