diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-03-06 11:32:24 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-03-06 11:32:24 +0100 |
commit | 1cdf2ea1fa44bae7d400b602399e30d490173bf3 (patch) | |
tree | a5ab1f44b094f14c4bfdbfb0d6f6837de4bcbd13 /sysdeps/pthread/aio_misc.c | |
parent | 1597b7447a81f372068b68a7830ac83aa3b4527f (diff) | |
download | glibc-1cdf2ea1fa44bae7d400b602399e30d490173bf3.tar.gz glibc-1cdf2ea1fa44bae7d400b602399e30d490173bf3.tar.xz glibc-1cdf2ea1fa44bae7d400b602399e30d490173bf3.zip |
Fix aio_error thread-safety.
* sysdeps/pthread/aio_error.c: New file * sysdeps/pthread/aio_misc.c: Remove optimistic comment about synchronization.
Diffstat (limited to 'sysdeps/pthread/aio_misc.c')
-rw-r--r-- | sysdeps/pthread/aio_misc.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sysdeps/pthread/aio_misc.c b/sysdeps/pthread/aio_misc.c index 5d2b81e479..83a6cb951d 100644 --- a/sysdeps/pthread/aio_misc.c +++ b/sysdeps/pthread/aio_misc.c @@ -593,14 +593,6 @@ handle_fildes_io (void *arg) /* Get the mutex. */ pthread_mutex_lock (&__aio_requests_mutex); - /* In theory we would need here a write memory barrier since the - callers test using aio_error() whether the request finished - and once this value != EINPROGRESS the field __return_value - must be committed to memory. - - But since the pthread_mutex_lock call involves write memory - barriers as well it is not necessary. */ - if (aiocbp->aiocb.__return_value == -1) aiocbp->aiocb.__error_code = errno; else |