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 void ObjectMonitor::set_header(markOop hdr) {
40 _header = hdr;
41 }
42
43 inline jint ObjectMonitor::count() const {
44 return _count;
45 }
46
47 inline jint ObjectMonitor::waiters() const {
48 return _waiters;
49 }
50
51 inline void* ObjectMonitor::owner() const {
52 return _owner;
53 }
54
55 inline void ObjectMonitor::clear() {
56 assert(_header, "Fatal logic error in ObjectMonitor header!");
57 assert(_count == 0, "Fatal logic error in ObjectMonitor count!");
58 assert(_waiters == 0, "Fatal logic error in ObjectMonitor waiters!");
|
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 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() {
60 assert(_header, "Fatal logic error in ObjectMonitor header!");
61 assert(_count == 0, "Fatal logic error in ObjectMonitor count!");
62 assert(_waiters == 0, "Fatal logic error in ObjectMonitor waiters!");
|