src/hotspot/share/utilities/hashtable.inline.hpp
changeset 59247 56bf71d64d51
parent 54764 865ec913f916
child 59290 97d13893ec3c
equal deleted inserted replaced
59246:fcad92f425c5 59247:56bf71d64d51
    86 template <MEMFLAGS F> inline void HashtableBucket<F>::set_entry(BasicHashtableEntry<F>* l) {
    86 template <MEMFLAGS F> inline void HashtableBucket<F>::set_entry(BasicHashtableEntry<F>* l) {
    87   // Warning: Preserve store ordering.  The PackageEntryTable, ModuleEntryTable and
    87   // Warning: Preserve store ordering.  The PackageEntryTable, ModuleEntryTable and
    88   //          SystemDictionary are read without locks.  The new entry must be
    88   //          SystemDictionary are read without locks.  The new entry must be
    89   //          complete before other threads can be allowed to see it
    89   //          complete before other threads can be allowed to see it
    90   //          via a store to _buckets[index].
    90   //          via a store to _buckets[index].
    91   OrderAccess::release_store(&_entry, l);
    91   Atomic::release_store(&_entry, l);
    92 }
    92 }
    93 
    93 
    94 
    94 
    95 template <MEMFLAGS F> inline BasicHashtableEntry<F>* HashtableBucket<F>::get_entry() const {
    95 template <MEMFLAGS F> inline BasicHashtableEntry<F>* HashtableBucket<F>::get_entry() const {
    96   // Warning: Preserve load ordering.  The PackageEntryTable, ModuleEntryTable and
    96   // Warning: Preserve load ordering.  The PackageEntryTable, ModuleEntryTable and
    97   //          SystemDictionary are read without locks.  The new entry must be
    97   //          SystemDictionary are read without locks.  The new entry must be
    98   //          complete before other threads can be allowed to see it
    98   //          complete before other threads can be allowed to see it
    99   //          via a store to _buckets[index].
    99   //          via a store to _buckets[index].
   100   return OrderAccess::load_acquire(&_entry);
   100   return Atomic::load_acquire(&_entry);
   101 }
   101 }
   102 
   102 
   103 
   103 
   104 template <MEMFLAGS F> inline void BasicHashtable<F>::set_entry(int index, BasicHashtableEntry<F>* entry) {
   104 template <MEMFLAGS F> inline void BasicHashtable<F>::set_entry(int index, BasicHashtableEntry<F>* entry) {
   105   _buckets[index].set_entry(entry);
   105   _buckets[index].set_entry(entry);