On Wed, Oct 16, 2019 at 5:11 AM <[email protected]> wrote: > Author: ivan > Date: Wed Oct 16 10:10:59 2019 > New Revision: 1868502 > > URL: http://svn.apache.org/viewvc?rev=1868502&view=rev > Log: > * atomic/win32/apr_atomic64.c > (apr_atomic_read64): Use direct memory read when compiled for x86_x64, > since > 64-bit reads are atomic in 64-bit Windows [1]. > > + /* > https://docs.microsoft.com/en-us/windows/win32/sync/interlocked-variable-access > + * "Simple reads and writes to properly aligned 64-bit variables are > atomic > + * on 64-bit Windows."*/ > + return *mem; >
Where are we[1] ensuring *mem is aligned on an 8 byte boundary? It should be straightforward to guard that (mem & 7) requires the legacy behavior. [1] Of course sparc and similar just throw sigbus, but this is intel.
