< prev index next >
src/os_cpu/linux_zero/vm/atomic_linux_zero.hpp
Print this page
rev 13526 : 8186855: Multiple platforms broken after 8186476: Generalize Atomic::add with templates
@@ -176,12 +176,12 @@
};
template<>
template<typename I, typename D>
inline D Atomic::PlatformAdd<4>::add_and_fetch(I add_value, D volatile* dest) const {
- STATIC_CAST(4 == sizeof(I));
- STATIC_CAST(4 == sizeof(D));
+ STATIC_ASSERT(4 == sizeof(I));
+ STATIC_ASSERT(4 == sizeof(D));
#ifdef ARM
return add_using_helper<int>(arm_add_and_fetch, add_value, dest);
#else
#ifdef M68K
@@ -193,12 +193,12 @@
}
template<>
template<typename I, typename D>
inline D Atomic::PlatformAdd<8>::add_and_fetch(I add_value, D volatile* dest) const {
- STATIC_CAST(8 == sizeof(I));
- STATIC_CAST(8 == sizeof(D));
+ STATIC_ASSERT(8 == sizeof(I));
+ STATIC_ASSERT(8 == sizeof(D));
return __sync_add_and_fetch(dest, add_value);
}
inline void Atomic::inc(volatile jint* dest) {
< prev index next >