519 // To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially 520 // aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to 521 // achieve is to place your short value next to another short value, which doesn't need atomic ops. 522 // 523 // Example 524 // ATOMIC_SHORT_PAIR( 525 // volatile short _refcount, // needs atomic operation 526 // unsigned short _length // number of UTF8 characters in the symbol (does not need atomic op) 527 // ); 528 529 #ifdef VM_LITTLE_ENDIAN 530 #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ 531 non_atomic_decl; \ 532 atomic_decl 533 #else 534 #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ 535 atomic_decl; \ 536 non_atomic_decl 537 #endif 538 539 #endif // SHARE_VM_UTILITIES_MACROS_HPP | 519 // To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially 520 // aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to 521 // achieve is to place your short value next to another short value, which doesn't need atomic ops. 522 // 523 // Example 524 // ATOMIC_SHORT_PAIR( 525 // volatile short _refcount, // needs atomic operation 526 // unsigned short _length // number of UTF8 characters in the symbol (does not need atomic op) 527 // ); 528 529 #ifdef VM_LITTLE_ENDIAN 530 #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ 531 non_atomic_decl; \ 532 atomic_decl 533 #else 534 #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl) \ 535 atomic_decl; \ 536 non_atomic_decl 537 #endif 538 539 #if INCLUDE_CDS && INCLUDE_ALL_GCS && defined(_LP64) && !defined(_WINDOWS) 540 #define INCLUDE_CDS_JAVA_HEAP 1 541 #define CDS_JAVA_HEAP_ONLY(x) x 542 #define NOT_CDS_JAVA_HEAP(x) 543 #define NOT_CDS_JAVA_HEAP_RETURN 544 #define NOT_CDS_JAVA_HEAP_RETURN_(code) 545 #else 546 #define INCLUDE_CDS_JAVA_HEAP 0 547 #define CDS_JAVA_HEAP_ONLY(x) 548 #define NOT_CDS_JAVA_HEAP(x) x 549 #define NOT_CDS_JAVA_HEAP_RETURN {} 550 #define NOT_CDS_JAVA_HEAP_RETURN_(code) { return code; } 551 #endif 552 553 #endif // SHARE_VM_UTILITIES_MACROS_HPP |