mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
8057109: manual cleanup of white space issues prior to Contended Locking reorder and cache line bucket
Reviewed-by: fparain, sspitsyn, coleenp
This commit is contained in:
parent
e1a36d62a0
commit
5e63b8cfc4
16 changed files with 1594 additions and 1481 deletions
|
@ -74,12 +74,12 @@ class Atomic : AllStatic {
|
|||
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 @@ class Atomic : AllStatic {
|
|||
// 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 @@ class Atomic : AllStatic {
|
|||
// 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 @@ class Atomic : AllStatic {
|
|||
// );
|
||||
|
||||
#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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue