]> granicus.if.org Git - postgresql/commitdiff
Move comment about sun cc's __machine_rw_barrier being a full barrier.
authorAndres Freund <andres@anarazel.de>
Thu, 8 Jan 2015 12:08:05 +0000 (13:08 +0100)
committerAndres Freund <andres@anarazel.de>
Thu, 8 Jan 2015 12:08:05 +0000 (13:08 +0100)
I'd accidentally written the comment besides the read barrier, instead
of the full barrier, implementation.

Noticed by Oskari Saarenmaa

src/include/port/atomics/generic-sunpro.h

index a024c50d646e0dd1b61fc8edf2786760e7005ae2..b756fb979ce60133467026ac05cf5c6e051b7aba 100644 (file)
 #define pg_compiler_barrier_impl()     __compiler_barrier()
 
 #ifndef pg_memory_barrier_impl
-#      define pg_memory_barrier_impl()         __machine_rw_barrier()
-#endif
-#ifndef pg_read_barrier_impl
 /*
- * Despite the name this is actually a full barrier. Expanding to mfence and
+ * Despite the name this is actually a full barrier. Expanding to mfence/
  * membar #StoreStore | #LoadStore | #StoreLoad | #LoadLoad on x86/sparc
  * respectively.
  */
+#      define pg_memory_barrier_impl()         __machine_rw_barrier()
+#endif
+#ifndef pg_read_barrier_impl
 #      define pg_read_barrier_impl()           __machine_r_barrier()
 #endif
 #ifndef pg_write_barrier_impl