< prev index next >

src/hotspot/share/runtime/objectMonitor.inline.hpp

Print this page
rev 47409 : [mq]: review_comments_erik_and_david
rev 47400 : [mq]: cmpxchg_ptr
rev 47216 : 8187443: Forest Consolidation: Move files to unified layout
Reviewed-by: darcy, ihse


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_OBJECTMONITOR_INLINE_HPP
  26 #define SHARE_VM_RUNTIME_OBJECTMONITOR_INLINE_HPP
  27 
  28 inline intptr_t ObjectMonitor::is_entered(TRAPS) const {
  29   if (THREAD == _owner || THREAD->is_lock_owned((address) _owner)) {
  30     return 1;
  31   }
  32   return 0;
  33 }
  34 
  35 inline markOop ObjectMonitor::header() const {
  36   return _header;
  37 }
  38 
  39 inline markOopDesc* volatile* ObjectMonitor::header_addr() {

  40   return &_header;
  41 }
  42 
  43 inline void ObjectMonitor::set_header(markOop hdr) {
  44   _header = hdr;
  45 }
  46 
  47 inline jint ObjectMonitor::count() const {
  48   return _count;
  49 }
  50 
  51 inline jint ObjectMonitor::waiters() const {
  52   return _waiters;
  53 }
  54 
  55 inline void* ObjectMonitor::owner() const {
  56   return _owner;
  57 }
  58 
  59 inline void ObjectMonitor::clear() {




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_OBJECTMONITOR_INLINE_HPP
  26 #define SHARE_VM_RUNTIME_OBJECTMONITOR_INLINE_HPP
  27 
  28 inline intptr_t ObjectMonitor::is_entered(TRAPS) const {
  29   if (THREAD == _owner || THREAD->is_lock_owned((address) _owner)) {
  30     return 1;
  31   }
  32   return 0;
  33 }
  34 
  35 inline markOop ObjectMonitor::header() const {
  36   return _header;
  37 }
  38 
  39 inline markOopDesc* volatile* ObjectMonitor::header_addr() {
  40   assert((intptr_t)this == (intptr_t)&_header, "sync code expects this");
  41   return &_header;
  42 }
  43 
  44 inline void ObjectMonitor::set_header(markOop hdr) {
  45   _header = hdr;
  46 }
  47 
  48 inline jint ObjectMonitor::count() const {
  49   return _count;
  50 }
  51 
  52 inline jint ObjectMonitor::waiters() const {
  53   return _waiters;
  54 }
  55 
  56 inline void* ObjectMonitor::owner() const {
  57   return _owner;
  58 }
  59 
  60 inline void ObjectMonitor::clear() {


< prev index next >