src/hotspot/share/utilities/macros.hpp
changeset 51330 edd33b9946ca
parent 50976 59ee619866c3
child 52351 0ecb4e520110
equal deleted inserted replaced
51329:9c68699bebe5 51330:edd33b9946ca
   607 #define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp)
   607 #define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp)
   608 // basename<compiler>.hpp / basename<compiler>.inline.hpp
   608 // basename<compiler>.hpp / basename<compiler>.inline.hpp
   609 #define COMPILER_HEADER(basename)        XSTR(COMPILER_HEADER_STEM(basename).hpp)
   609 #define COMPILER_HEADER(basename)        XSTR(COMPILER_HEADER_STEM(basename).hpp)
   610 #define COMPILER_HEADER_INLINE(basename) XSTR(COMPILER_HEADER_STEM(basename).inline.hpp)
   610 #define COMPILER_HEADER_INLINE(basename) XSTR(COMPILER_HEADER_STEM(basename).inline.hpp)
   611 
   611 
   612 // To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially
       
   613 // aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to
       
   614 // achieve is to place your short value next to another short value, which doesn't need atomic ops.
       
   615 //
       
   616 // Example
       
   617 //  ATOMIC_SHORT_PAIR(
       
   618 //    volatile short _refcount,  // needs atomic operation
       
   619 //    unsigned short _length     // number of UTF8 characters in the symbol (does not need atomic op)
       
   620 //  );
       
   621 
       
   622 #ifdef VM_LITTLE_ENDIAN
       
   623   #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
       
   624     non_atomic_decl;                                       \
       
   625     atomic_decl
       
   626 #else
       
   627   #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
       
   628     atomic_decl;                                           \
       
   629     non_atomic_decl
       
   630 #endif
       
   631 
       
   632 #if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64) && !defined(_WINDOWS)
   612 #if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64) && !defined(_WINDOWS)
   633 #define INCLUDE_CDS_JAVA_HEAP 1
   613 #define INCLUDE_CDS_JAVA_HEAP 1
   634 #define CDS_JAVA_HEAP_ONLY(x) x
   614 #define CDS_JAVA_HEAP_ONLY(x) x
   635 #define NOT_CDS_JAVA_HEAP(x)
   615 #define NOT_CDS_JAVA_HEAP(x)
   636 #define NOT_CDS_JAVA_HEAP_RETURN
   616 #define NOT_CDS_JAVA_HEAP_RETURN