src/share/vm/oops/constantPool.hpp

changeset 5971
b8860472c377
parent 5760
084b21cd0228
child 6876
710a3c8b516e
child 8961
b0b6bdcf22f0
     1.1 --- a/src/share/vm/oops/constantPool.hpp	Mon Oct 21 17:26:46 2013 -0700
     1.2 +++ b/src/share/vm/oops/constantPool.hpp	Tue Oct 22 14:29:02 2013 -0700
     1.3 @@ -111,6 +111,7 @@
     1.4      int                _version;
     1.5    } _saved;
     1.6  
     1.7 +  Monitor*             _lock;
     1.8  
     1.9    void set_tags(Array<u1>* tags)               { _tags = tags; }
    1.10    void tag_at_put(int which, jbyte t)          { tags()->at_put(which, t); }
    1.11 @@ -843,17 +844,8 @@
    1.12  
    1.13    void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; }
    1.14    int  resolved_reference_length() const  { return _saved._resolved_reference_length; }
    1.15 -
    1.16 -  // lock() may return null -- constant pool updates may happen before this lock is
    1.17 -  // initialized, because the _pool_holder has not been fully initialized and
    1.18 -  // has not been registered into the system dictionary. In this case, no other
    1.19 -  // thread can be modifying this constantpool, so no synchronization is
    1.20 -  // necessary.
    1.21 -  //
    1.22 -  // Use cplock() like this:
    1.23 -  //    oop cplock = cp->lock();
    1.24 -  //    ObjectLocker ol(cplock , THREAD, cplock != NULL);
    1.25 -  oop lock();
    1.26 +  void set_lock(Monitor* lock)            { _lock = lock; }
    1.27 +  Monitor* lock()                         { return _lock; }
    1.28  
    1.29    // Decrease ref counts of symbols that are in the constant pool
    1.30    // when the holder class is unloaded

mercurial