Files
semi-libc/src/aio/aio_cancel.c
T
Rich Felker b4de6f93ae implement POSIX asynchronous io
some features are not yet supported, and only minimal testing has been
performed. should be considered experimental at this point.
2011-09-09 01:07:38 -04:00

17 lines
483 B
C

#include <aio.h>
#include <pthread.h>
#include <errno.h>
int aio_cancel(int fd, struct aiocb *cb)
{
if (!cb) {
/* FIXME: for correctness, we should return AIO_ALLDONE
* if there are no outstanding aio operations on this
* file descriptor, but that would require making aio
* much slower, and seems to have little advantage since
* we don't support cancellation anyway. */
return AIO_NOTCANCELED;
}
return cb->__err==EINPROGRESS ? AIO_NOTCANCELED : AIO_ALLDONE;
}