fix bad character checking in wordexp
[oweals/musl.git] / src / aio / aio_cancel.c
1 #include <aio.h>
2 #include <pthread.h>
3 #include <errno.h>
4 #include "libc.h"
5
6 int aio_cancel(int fd, struct aiocb *cb)
7 {
8         if (!cb) {
9                 /* FIXME: for correctness, we should return AIO_ALLDONE
10                  * if there are no outstanding aio operations on this
11                  * file descriptor, but that would require making aio
12                  * much slower, and seems to have little advantage since
13                  * we don't support cancellation anyway. */
14                 return AIO_NOTCANCELED;
15         }
16         return cb->__err==EINPROGRESS ? AIO_NOTCANCELED : AIO_ALLDONE;
17 }
18
19 LFS64(aio_cancel);