LinuxReviws.org --get your your Linux knowledge
> Linux Reviews > Manual Pages (man) >

io_cancel

cancel io requests


  1. io_cancel.1.man
  2. io_cancel.2.man
  3. io_cancel.3.man


1. io_cancel.1.man

Manpage of io_cancel

io_cancel

Section: Linux AIO (2)
Updated: 2002-09-03
Index Return to Main Contents
 

NAME

io_cancel - cancel io requests  

SYNOPSIS

#include <errno.h>
#include <libaio.h>

int io_submit(io_context_t ctx, struct iocb *iocb, struct io_event *result);


 

Index

NAME
SYNOPSIS

This document was created by man2html using the manual pages.
Time: 17:31:14 GMT, October 23, 2013

2. io_cancel.2.man

Manpage of IO_CANCEL

IO_CANCEL

Section: Linux Programmer's Manual (2)
Updated: 2008-06-18
Index Return to Main Contents
 

NAME

io_cancel - cancel an outstanding asynchronous I/O operation  

SYNOPSIS

#include <libaio.h>

int io_cancel(aio_context_t ctx_id, struct iocb *iocb,
              struct io_event *result);

Link with -laio.
 

DESCRIPTION

io_cancel() attempts to cancel an asynchronous I/O operation previously submitted with io_submit(2). ctx_id is the AIO context ID of the operation to be canceled. If the AIO context is found, the event will be canceled and then copied into the memory pointed to by result without being placed into the completion queue.  

RETURN VALUE

On success, io_cancel() returns 0. For the failure return, see NOTES.  

ERRORS

EAGAIN
The iocb specified was not canceled.
EFAULT
One of the data structures points to invalid data.
EINVAL
The AIO context specified by ctx_id is invalid.
ENOSYS
io_cancel() is not implemented on this architecture.
 

VERSIONS

The asynchronous I/O system calls first appeared in Linux 2.5, August 2002.  

CONFORMING TO

io_cancel() is Linux-specific and should not be used in programs that are intended to be portable.  

NOTES

Glibc does not provide a wrapper function for this system call.

The wrapper provided in libaio for io_cancel() does not follow the usual C library conventions for indicating error: on error it returns a negated error number (the negative of one of the values listed in ERRORS). If the system call is invoked via syscall(2), then the return value follows the usual conventions for indicating an error: -1, with errno set to a (positive) value that indicates the error.  

SEE ALSO

io_destroy(2), io_getevents(2), io_setup(2), io_submit(2), aio(7)  

COLOPHON

This page is part of release 3.32 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
VERSIONS
CONFORMING TO
NOTES
SEE ALSO
COLOPHON

This document was created by man2html using the manual pages.
Time: 17:31:14 GMT, October 23, 2013

3. io_cancel.3.man

Manpage of io_cancel

io_cancel

Section: Linux AIO (2)
Updated: 2002-09-03
Index Return to Main Contents
 

NAME

io_cancel - Cancel io requests  

SYNOPSIS

#include <errno.h>


#include <libaio.h>
int io_cancel(io_context_t ctx, struct iocb *iocb)
struct iocb { void *data; /* Return in the io completion event */ unsigned key; /* For use in identifying io requests */ short aio_lio_opcode; short aio_reqprio; /* Not used */ int aio_fildes; };
 

DESCRIPTION

Attempts to cancel an iocb previously passed to io_submit. If the operation is successfully cancelled, the resulting event is copied into the memory pointed to by result without being placed into the completion queue.

When one or more requests are asynchronously processed, it might be useful in some situations to cancel a selected operation, e.g., if it becomes obvious that the written data is no longer accurate and would have to be overwritten soon. As an example, assume an application, which writes data in files in a situation where new incoming data would have to be written in a file which will be updated by an enqueued request.  

RETURN VALUES

0 is returned on success , otherwise returns Errno.  

ERRORS

EFAULT
If any of the data structures pointed to are invalid.
EINVAL
If aio_context specified by ctx_id is invalid.
EAGAIN
If the iocb specified was not cancelled.
ENOSYS
if not implemented.
 

SEE ALSO

io(3), io_fsync(3), io_getevents(3), io_prep_fsync(3), io_prep_pread(3), io_prep_pwrite(3), io_queue_init(3), io_queue_release(3), io_queue_run(3), io_queue_wait(3), io_set_callback(3), io_submit(3), errno(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
ERRORS
SEE ALSO

This document was created by man2html using the manual pages.
Time: 17:31:14 GMT, October 23, 2013

ENGLISH - ja - ENGLISH

Meet new people