|
12 | 12 | * * pg_compiler_barrier(), pg_write_barrier(), pg_read_barrier()
|
13 | 13 | * * pg_atomic_compare_exchange_u32(), pg_atomic_fetch_add_u32()
|
14 | 14 | * * pg_atomic_test_set_flag(), pg_atomic_init_flag(), pg_atomic_clear_flag()
|
| 15 | + * * PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY should be defined if appropriate. |
15 | 16 | *
|
16 | 17 | * There exist generic, hardware independent, implementations for several
|
17 | 18 | * compilers which might be sufficient, although possibly not optimal, for a
|
18 | 19 | * new platform. If no such generic implementation is available spinlocks (or
|
19 | 20 | * even OS provided semaphores) will be used to implement the API.
|
20 | 21 | *
|
21 |
| - * Implementthe_u64variants if and only if your platform can use them |
| 22 | + * Implement _u64atomics if and only if your platform can use them |
22 | 23 | * efficiently (and obviously correctly).
|
23 | 24 | *
|
24 | 25 | * Use higher level functionality (lwlocks, spinlocks, heavyweight locks)
|
|
110 | 111 |
|
111 | 112 | /*
|
112 | 113 | * Provide a full fallback of the pg_*_barrier(), pg_atomic**_flag and
|
113 |
| - * pg_atomic_*_u32 APIs for platforms without sufficient spinlock and/or |
114 |
| - *atomicssupport. In the case of spinlock backed atomics the emulation is |
115 |
| - *expectedto be efficient, although less so than native atomics support. |
| 114 | + * pg_atomic_* APIs for platforms without sufficient spinlock and/or atomics |
| 115 | + * support. In the case of spinlock backed atomics the emulation is expected |
| 116 | + * to be efficient, although less so than native atomics support. |
116 | 117 | */
|
117 | 118 | #include"port/atomics/fallback.h"
|
118 | 119 |
|
@@ -421,8 +422,6 @@ pg_atomic_sub_fetch_u32(volatile pg_atomic_uint32 *ptr, int32 sub_)
|
421 | 422 | * documentation.
|
422 | 423 | * ----
|
423 | 424 | */
|
424 |
| -#ifdefPG_HAVE_ATOMIC_U64_SUPPORT |
425 |
| - |
426 | 425 | staticinlinevoid
|
427 | 426 | pg_atomic_init_u64(volatilepg_atomic_uint64*ptr,uint64val)
|
428 | 427 | {
|
@@ -506,8 +505,6 @@ pg_atomic_sub_fetch_u64(volatile pg_atomic_uint64 *ptr, int64 sub_)
|
506 | 505 | returnpg_atomic_sub_fetch_u64_impl(ptr,sub_);
|
507 | 506 | }
|
508 | 507 |
|
509 |
| -#endif/* PG_HAVE_64_BIT_ATOMICS */ |
510 |
| - |
511 | 508 | #undef INSIDE_ATOMICS_H
|
512 | 509 |
|
513 | 510 | #endif/* ATOMICS_H */
|