--- a/hotspot/src/share/vm/runtime/atomic.hpp Wed Sep 10 11:48:20 2014 -0600
+++ b/hotspot/src/share/vm/runtime/atomic.hpp Wed Sep 10 11:52:16 2014 -0600
@@ -74,12 +74,12 @@
inline static intptr_t add_ptr(intptr_t add_value, volatile intptr_t* dest);
inline static void* add_ptr(intptr_t add_value, volatile void* dest);
// See comment above about using jlong atomics on 32-bit platforms
- static jlong add (jlong add_value, volatile jlong* dest);
+ static jlong add (jlong add_value, volatile jlong* dest);
// Atomically increment location. inc*() provide:
// <fence> increment-dest <membar StoreLoad|StoreStore>
inline static void inc (volatile jint* dest);
- static void inc (volatile jshort* dest);
+ static void inc (volatile jshort* dest);
inline static void inc (volatile size_t* dest);
inline static void inc_ptr(volatile intptr_t* dest);
inline static void inc_ptr(volatile void* dest);
@@ -87,7 +87,7 @@
// Atomically decrement a location. dec*() provide:
// <fence> decrement-dest <membar StoreLoad|StoreStore>
inline static void dec (volatile jint* dest);
- static void dec (volatile jshort* dest);
+ static void dec (volatile jshort* dest);
inline static void dec (volatile size_t* dest);
inline static void dec_ptr(volatile intptr_t* dest);
inline static void dec_ptr(volatile void* dest);
@@ -95,27 +95,22 @@
// Performs atomic exchange of *dest with exchange_value. Returns old
// prior value of *dest. xchg*() provide:
// <fence> exchange-value-with-dest <membar StoreLoad|StoreStore>
- inline static jint xchg(jint exchange_value, volatile jint* dest);
- static unsigned int xchg(unsigned int exchange_value, volatile unsigned int* dest);
-
- inline static intptr_t xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest);
- inline static void* xchg_ptr(void* exchange_value, volatile void* dest);
+ inline static jint xchg (jint exchange_value, volatile jint* dest);
+ static unsigned int xchg (unsigned int exchange_value, volatile unsigned int* dest);
+ inline static intptr_t xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest);
+ inline static void* xchg_ptr(void* exchange_value, volatile void* dest);
// Performs atomic compare of *dest and compare_value, and exchanges
// *dest with exchange_value if the comparison succeeded. Returns prior
// value of *dest. cmpxchg*() provide:
// <fence> compare-and-exchange <membar StoreLoad|StoreStore>
- static jbyte cmpxchg (jbyte exchange_value, volatile jbyte* dest, jbyte compare_value);
- inline static jint cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value);
+ static jbyte cmpxchg (jbyte exchange_value, volatile jbyte* dest, jbyte compare_value);
+ inline static jint cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value);
// See comment above about using jlong atomics on 32-bit platforms
- inline static jlong cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value);
-
- static unsigned int cmpxchg(unsigned int exchange_value,
- volatile unsigned int* dest,
- unsigned int compare_value);
-
- inline static intptr_t cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value);
- inline static void* cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value);
+ inline static jlong cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value);
+ static unsigned int cmpxchg (unsigned int exchange_value, volatile unsigned int* dest, unsigned int compare_value);
+ inline static intptr_t cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value);
+ inline static void* cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value);
};
// To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially
@@ -129,12 +124,12 @@
// );
#ifdef VM_LITTLE_ENDIAN
-#define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \
- non_atomic_decl; \
+ #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \
+ non_atomic_decl; \
atomic_decl
#else
-#define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \
- atomic_decl; \
+ #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \
+ atomic_decl; \
non_atomic_decl
#endif