changeset 13595:9cf835fba355

8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates Reviewed-by: goetz
author mdoerr
date Thu, 24 Aug 2017 14:56:48 +0200
parents 143019ae96f5
children 3a8e59bdaaac
files src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp	Wed Aug 23 23:38:06 2017 +0200
+++ b/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp	Thu Aug 24 14:56:48 2017 +0200
@@ -30,6 +30,8 @@
 #error "Atomic currently only impleneted for PPC64"
 #endif
 
+#include "utilities/debug.hpp"
+
 // Implementation of class atomic
 
 inline void Atomic::store    (jbyte    store_value, jbyte*    dest) { *dest = store_value; }
@@ -312,7 +314,7 @@
                                                 T volatile* dest,
                                                 T compare_value,
                                                 cmpxchg_memory_order order) const {
-  STATIC_CAST(1 == sizeof(T));
+  STATIC_ASSERT(1 == sizeof(T));
 
   // Note that cmpxchg guarantees a two-way memory barrier across
   // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
@@ -382,7 +384,7 @@
                                                 T volatile* dest,
                                                 T compare_value,
                                                 cmpxchg_memory_order order) const {
-  STATIC_CAST(4 == sizeof(T));
+  STATIC_ASSERT(4 == sizeof(T));
 
   // Note that cmpxchg guarantees a two-way memory barrier across
   // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not
@@ -432,7 +434,7 @@
                                                 T volatile* dest,
                                                 T compare_value,
                                                 cmpxchg_memory_order order) const {
-  STATIC_CAST(8 == sizeof(T));
+  STATIC_ASSERT(8 == sizeof(T));
 
   // Note that cmpxchg guarantees a two-way memory barrier across
   // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not