8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates
authormdoerr
Thu, 24 Aug 2017 14:56:48 +0200
changeset 46973 149e5319c938
parent 46972 3e88de95fccf
child 46975 59d4586da7bc
8186734: AIX build broken after 8186166: Generalize Atomic::cmpxchg with templates Reviewed-by: goetz
hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp
--- a/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp	Wed Aug 23 23:38:06 2017 +0200
+++ b/hotspot/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