src/share/vm/oops/instanceKlass.hpp

changeset 4984
c115fac239eb
parent 4981
d587a5c30bd8
child 5097
92ef81e2f571
     1.1 --- a/src/share/vm/oops/instanceKlass.hpp	Thu Apr 25 03:58:53 2013 -0700
     1.2 +++ b/src/share/vm/oops/instanceKlass.hpp	Thu Apr 25 12:55:49 2013 -0700
     1.3 @@ -184,8 +184,9 @@
     1.4    oop             _protection_domain;
     1.5    // Class signers.
     1.6    objArrayOop     _signers;
     1.7 -  // Initialization lock.  Must be one per class and it has to be a VM internal
     1.8 -  // object so java code cannot lock it (like the mirror)
     1.9 +  // Lock for (1) initialization; (2) access to the ConstantPool of this class.
    1.10 +  // Must be one per class and it has to be a VM internal object so java code
    1.11 +  // cannot lock it (like the mirror).
    1.12    // It has to be an object not a Mutex because it's held through java calls.
    1.13    volatile oop    _init_lock;
    1.14  
    1.15 @@ -970,6 +971,7 @@
    1.16  #endif // INCLUDE_ALL_GCS
    1.17  
    1.18    u2 idnum_allocated_count() const      { return _idnum_allocated_count; }
    1.19 +
    1.20  private:
    1.21    // initialization state
    1.22  #ifdef ASSERT
    1.23 @@ -996,9 +998,10 @@
    1.24           { OrderAccess::release_store_ptr(&_methods_cached_itable_indices, indices); }
    1.25  
    1.26    // Lock during initialization
    1.27 -  volatile oop init_lock() const;
    1.28 -  void set_init_lock(oop value)      { klass_oop_store(&_init_lock, value); }
    1.29 -  void fence_and_clear_init_lock();  // after fully_initialized
    1.30 +public:
    1.31 +  volatile oop init_lock() const     {return _init_lock; }
    1.32 +private:
    1.33 +  void set_init_lock(oop value) { klass_oop_store(&_init_lock, value); }
    1.34  
    1.35    // Offsets for memory management
    1.36    oop* adr_protection_domain() const { return (oop*)&this->_protection_domain;}

mercurial