diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-07-25 07:56:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-07-25 07:56:33 +0000 |
commit | 7b787f8516c039ed56b1bc3f511eb1165526061b (patch) | |
tree | 23522977702d05b9e5aacbcaf115ff165841b404 /sysdeps | |
parent | 02ade8d6b0058becfb8d3156e8b9cc3519bfb4bb (diff) | |
download | glibc-7b787f8516c039ed56b1bc3f511eb1165526061b.tar glibc-7b787f8516c039ed56b1bc3f511eb1165526061b.tar.gz glibc-7b787f8516c039ed56b1bc3f511eb1165526061b.tar.bz2 glibc-7b787f8516c039ed56b1bc3f511eb1165526061b.zip |
Update.
2003-07-24 Jakub Jelinek <jakub@redhat.com>
* sysdeps/pthread/aio_cancel.c (aio_cancel): Return AIO_ALLDONE
if aiocbp != NULL and has already completed. Return -1/EINVAL if
aiocbp->aio_fildes does not match fildes.
Diffstat (limited to 'sysdeps')
-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 b2f7be1935..a37b2c7896 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; |