hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java
changeset 36316 7a83de7aabca
parent 35103 d19354bcbfa6
child 36827 53d2d43551d2
equal deleted inserted replaced
36315:150a415079ae 36316:7a83de7aabca
   155             char x = UNSAFE.getCharVolatile(base, offset);
   155             char x = UNSAFE.getCharVolatile(base, offset);
   156             assertEquals(x, 'b', "putVolatile char value");
   156             assertEquals(x, 'b', "putVolatile char value");
   157         }
   157         }
   158 
   158 
   159 
   159 
       
   160         // Lazy
       
   161         {
       
   162             UNSAFE.putCharRelease(base, offset, 'a');
       
   163             char x = UNSAFE.getCharAcquire(base, offset);
       
   164             assertEquals(x, 'a', "putRelease char value");
       
   165         }
       
   166 
       
   167         // Opaque
       
   168         {
       
   169             UNSAFE.putCharOpaque(base, offset, 'b');
       
   170             char x = UNSAFE.getCharOpaque(base, offset);
       
   171             assertEquals(x, 'b', "putOpaque char value");
       
   172         }
       
   173 
   160         // Unaligned
   174         // Unaligned
   161         {
   175         {
   162             UNSAFE.putCharUnaligned(base, offset, 'b');
   176             UNSAFE.putCharUnaligned(base, offset, 'b');
   163             char x = UNSAFE.getCharUnaligned(base, offset);
   177             char x = UNSAFE.getCharUnaligned(base, offset);
   164             assertEquals(x, 'b', "putUnaligned char value");
   178             assertEquals(x, 'b', "putUnaligned char value");