diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-01-08 01:51:18 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-01-08 01:51:18 +0000 |
commit | 04454efba24f352eee6dca7442166dade5000392 (patch) | |
tree | 5008ff963b447d24c16c492a74a886fc949fa556 /nptl/sysdeps | |
parent | ca3d773e19effd28cab7720921d1b08781805cf4 (diff) | |
download | glibc-04454efba24f352eee6dca7442166dade5000392.tar glibc-04454efba24f352eee6dca7442166dade5000392.tar.gz glibc-04454efba24f352eee6dca7442166dade5000392.tar.bz2 glibc-04454efba24f352eee6dca7442166dade5000392.zip |
(AIO_MISC_WAIT): Work around gcc being to clever and reloading the futex value where it shouldn't.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/pthread/aio_misc.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/aio_misc.h b/nptl/sysdeps/pthread/aio_misc.h index 5aeb34eb98..f285083883 100644 --- a/nptl/sysdeps/pthread/aio_misc.h +++ b/nptl/sysdeps/pthread/aio_misc.h @@ -35,6 +35,7 @@ #define AIO_MISC_WAIT(result, futex, timeout, cancel) \ do { \ + volatile int *futexaddr = &futex; \ int oldval = futex; \ \ if (oldval != 0) \ @@ -48,11 +49,11 @@ int status; \ do \ { \ - status = lll_futex_timed_wait (&futex, oldval, timeout); \ + status = lll_futex_timed_wait (futexaddr, oldval, timeout); \ if (status != -EWOULDBLOCK) \ break; \ \ - oldval = futex; \ + oldval = *futexaddr; \ } \ while (oldval != 0); \ \ |