diff options
| author | Andres Freund | 2017-04-07 21:44:47 +0000 |
|---|---|---|
| committer | Andres Freund | 2017-04-07 21:48:11 +0000 |
| commit | e8fdbd58fe564a29977f4331cd26f9697d76fc40 (patch) | |
| tree | 7ac78010b4ad51730fe948a79e7c5d7e5f461981 /src/test | |
| parent | 28afad5c85b436f19d9f2c0e3197c7db960fef6f (diff) | |
Improve 64bit atomics support.
When adding atomics back in b64d92f1a, I added 64bit support as
optional; there wasn't yet a direct user in sight. That turned out to
be a bit short-sighted, it'd already have been useful a number of times.
Add a fallback implementation of 64bit atomics, just like the one we
have for 32bit atomics.
Additionally optimize reads/writes to 64bit on a number of platforms
where aligned writes of that size are atomic. This can now be tested
with PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY.
Author: Andres Freund
Reviewed-By: Amit Kapila
Discussion: https://postgr.es/m/20160330230914.GH13305@awork2.anarazel.de
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/regress.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index d7fb8498d86..80d0929df3a 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -997,7 +997,6 @@ test_atomic_uint32(void) elog(ERROR, "pg_atomic_fetch_and_u32() #3 wrong"); } -#ifdef PG_HAVE_ATOMIC_U64_SUPPORT static void test_atomic_uint64(void) { @@ -1073,7 +1072,6 @@ test_atomic_uint64(void) if (pg_atomic_fetch_and_u64(&var, ~0) != 0) elog(ERROR, "pg_atomic_fetch_and_u64() #3 wrong"); } -#endif /* PG_HAVE_ATOMIC_U64_SUPPORT */ PG_FUNCTION_INFO_V1(test_atomic_ops); @@ -1096,9 +1094,7 @@ test_atomic_ops(PG_FUNCTION_ARGS) test_atomic_uint32(); -#ifdef PG_HAVE_ATOMIC_U64_SUPPORT test_atomic_uint64(); -#endif PG_RETURN_BOOL(true); } |
