< prev index next >
src/hotspot/share/runtime/mutex.hpp
Print this page
rev 56464 : 8231707: Improve Mutex inlining
Contributed-by: robbin.ehn@oracle.com, claes.redestad@oracle.com
*** 146,167 ****
SafepointCheckRequired safepoint_check_required = _safepoint_check_always);
~Mutex();
void lock(); // prints out warning if VM thread blocks
void lock(Thread *thread); // overloaded with current thread
- void unlock();
- bool is_locked() const { return _owner != NULL; }
! bool try_lock(); // Like lock(), but unblocking. It returns false instead
! void release_for_safepoint();
// Lock without safepoint check. Should ONLY be used by safepoint code and other code
// that is guaranteed not to block while running inside the VM.
void lock_without_safepoint_check();
void lock_without_safepoint_check(Thread* self);
// Current owner - not not MT-safe. Can only be used to guarantee that
// the current running thread owns the lock
Thread* owner() const { return _owner; }
bool owned_by_self() const;
--- 146,172 ----
SafepointCheckRequired safepoint_check_required = _safepoint_check_always);
~Mutex();
void lock(); // prints out warning if VM thread blocks
void lock(Thread *thread); // overloaded with current thread
! void lock_slow(Thread* self);
! bool try_lock(); // Like lock(), but unblocking. It returns false instead
! bool try_lock(Thread *thread); // overloaded with current thread
// Lock without safepoint check. Should ONLY be used by safepoint code and other code
// that is guaranteed not to block while running inside the VM.
void lock_without_safepoint_check();
void lock_without_safepoint_check(Thread* self);
+ void unlock();
+
+ bool is_locked() const { return _owner != NULL; }
+
+ void release_for_safepoint();
+
// Current owner - not not MT-safe. Can only be used to guarantee that
// the current running thread owns the lock
Thread* owner() const { return _owner; }
bool owned_by_self() const;
< prev index next >