19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
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
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
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 volatile markOop* 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
|