From 1cdf2ea1fa44bae7d400b602399e30d490173bf3 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 6 Mar 2015 11:32:24 +0100 Subject: Fix aio_error thread-safety. * sysdeps/pthread/aio_error.c: New file * sysdeps/pthread/aio_misc.c: Remove optimistic comment about synchronization. --- sysdeps/pthread/aio_misc.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'sysdeps/pthread/aio_misc.c') 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 -- cgit 1.4.1