diff options
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r-- | sysdeps/pthread/aio_cancel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/pthread/aio_cancel.c b/sysdeps/pthread/aio_cancel.c index b2f7be1..a37b2c7 100644 --- a/sysdeps/pthread/aio_cancel.c +++ b/sysdeps/pthread/aio_cancel.c @@ -60,7 +60,13 @@ aio_cancel (fildes, aiocbp) { /* If the AIO request is not for this descriptor it has no value to look for the request block. */ - if (aiocbp->aio_fildes == fildes) + if (aiocbp->aio_fildes != fildes) + { + pthread_mutex_unlock (&__aio_requests_mutex); + __set_errno (EINVAL); + return -1; + } + else if (aiocbp->__error_code == EINPROGRESS) { struct requestlist *last = NULL; |