755 * and so require only release ordering. |
755 * and so require only release ordering. |
756 */ |
756 */ |
757 |
757 |
758 @SuppressWarnings("unchecked") |
758 @SuppressWarnings("unchecked") |
759 static final <K,V> Node<K,V> tabAt(Node<K,V>[] tab, int i) { |
759 static final <K,V> Node<K,V> tabAt(Node<K,V>[] tab, int i) { |
760 return (Node<K,V>)U.getObjectAcquire(tab, ((long)i << ASHIFT) + ABASE); |
760 return (Node<K,V>)U.getReferenceAcquire(tab, ((long)i << ASHIFT) + ABASE); |
761 } |
761 } |
762 |
762 |
763 static final <K,V> boolean casTabAt(Node<K,V>[] tab, int i, |
763 static final <K,V> boolean casTabAt(Node<K,V>[] tab, int i, |
764 Node<K,V> c, Node<K,V> v) { |
764 Node<K,V> c, Node<K,V> v) { |
765 return U.compareAndSetObject(tab, ((long)i << ASHIFT) + ABASE, c, v); |
765 return U.compareAndSetReference(tab, ((long)i << ASHIFT) + ABASE, c, v); |
766 } |
766 } |
767 |
767 |
768 static final <K,V> void setTabAt(Node<K,V>[] tab, int i, Node<K,V> v) { |
768 static final <K,V> void setTabAt(Node<K,V>[] tab, int i, Node<K,V> v) { |
769 U.putObjectRelease(tab, ((long)i << ASHIFT) + ABASE, v); |
769 U.putReferenceRelease(tab, ((long)i << ASHIFT) + ABASE, v); |
770 } |
770 } |
771 |
771 |
772 /* ---------------- Fields -------------- */ |
772 /* ---------------- Fields -------------- */ |
773 |
773 |
774 /** |
774 /** |