git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 62f5e44) | patch
Fix alignment of pg_atomic_uint64 variables on some 32bit platforms.
2015年1月11日 00:06:37 +0000 (01:06 +0100)
2015年1月11日 00:06:37 +0000 (01:06 +0100)
commit db4ec2ffce3549225619cae51d828224a11a165f
Fix alignment of pg_atomic_uint64 variables on some 32bit platforms.

I failed to recognize that pg_atomic_uint64 wasn't guaranteed to be 8
byte aligned on some 32bit platforms - which it has to be on some
platforms to guarantee the desired atomicity and which we assert.

As this is all compiler specific code anyway we can just rely on
compiler specific tricks to enforce alignment.

I've been unable to find concrete documentation about the version that
introduce the sunpro alignment support, so that might need additional
guards.

I've verified that this works with gcc x86 32bit, but I don't have
access to any other 32bit environment.

Discussion: op.xpsjdkil0sbe7t@vld-kuci

Per report from Vladimir Koković.
src/include/port/atomics/arch-x86.h diff | blob | blame | history
src/include/port/atomics/generic-acc.h diff | blob | blame | history
src/include/port/atomics/generic-gcc.h diff | blob | blame | history
src/include/port/atomics/generic-msvc.h diff | blob | blame | history
src/include/port/atomics/generic-sunpro.h diff | blob | blame | history
src/include/port/atomics/generic-xlc.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /