mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-04 23:48:33 +00:00
8263896: Make not_suspended parameter from ObjectMonitor::exit() have default value
Reviewed-by: rehn, dcubed, dholmes
This commit is contained in:
parent
b65219881d
commit
2ad6f2d9bc
@ -388,6 +388,7 @@ bool ObjectMonitor::enter(JavaThread* current) {
|
||||
{ // Change java thread status to indicate blocked on monitor enter.
|
||||
JavaThreadBlockedOnMonitorEnterState jtbmes(current, this);
|
||||
|
||||
assert(current->current_pending_monitor() == NULL, "invariant");
|
||||
current->set_current_pending_monitor(this);
|
||||
|
||||
DTRACE_MONITOR_PROBE(contended__enter, this, object(), current);
|
||||
@ -421,7 +422,7 @@ bool ObjectMonitor::enter(JavaThread* current) {
|
||||
//
|
||||
_recursions = 0;
|
||||
_succ = NULL;
|
||||
exit(false, current);
|
||||
exit(current, false /* not_suspended */);
|
||||
|
||||
current->java_suspend_self();
|
||||
}
|
||||
@ -1139,7 +1140,7 @@ void ObjectMonitor::UnlinkAfterAcquire(JavaThread* current, ObjectWaiter* curren
|
||||
// structured the code so the windows are short and the frequency
|
||||
// of such futile wakups is low.
|
||||
|
||||
void ObjectMonitor::exit(bool not_suspended, JavaThread* current) {
|
||||
void ObjectMonitor::exit(JavaThread* current, bool not_suspended) {
|
||||
void* cur = owner_raw();
|
||||
if (current != cur) {
|
||||
if (current->is_lock_owned((address)cur)) {
|
||||
@ -1372,7 +1373,7 @@ intx ObjectMonitor::complete_exit(JavaThread* current) {
|
||||
guarantee(current == owner_raw(), "complete_exit not owner");
|
||||
intx save = _recursions; // record the old recursion count
|
||||
_recursions = 0; // set the recursion level to be 0
|
||||
exit(true, current); // exit the monitor
|
||||
exit(current); // exit the monitor
|
||||
guarantee(owner_raw() != current, "invariant");
|
||||
return save;
|
||||
}
|
||||
@ -1506,7 +1507,7 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
|
||||
intx save = _recursions; // record the old recursion count
|
||||
_waiters++; // increment the number of waiters
|
||||
_recursions = 0; // set the recursion level to be 1
|
||||
exit(true, current); // exit the monitor
|
||||
exit(current); // exit the monitor
|
||||
guarantee(owner_raw() != current, "invariant");
|
||||
|
||||
// The thread is on the WaitSet list - now park() it.
|
||||
|
||||
@ -303,7 +303,7 @@ class ObjectMonitor : public CHeapObj<mtInternal> {
|
||||
bool check_owner(TRAPS);
|
||||
|
||||
bool enter(JavaThread* current);
|
||||
void exit(bool not_suspended, JavaThread* current);
|
||||
void exit(JavaThread* current, bool not_suspended = true);
|
||||
void wait(jlong millis, bool interruptible, TRAPS);
|
||||
void notify(TRAPS);
|
||||
void notifyAll(TRAPS);
|
||||
|
||||
@ -518,7 +518,7 @@ void ObjectSynchronizer::exit(oop object, BasicLock* lock, JavaThread* current)
|
||||
// The ObjectMonitor* can't be async deflated until ownership is
|
||||
// dropped inside exit() and the ObjectMonitor* must be !is_busy().
|
||||
ObjectMonitor* monitor = inflate(current, object, inflate_cause_vm_internal);
|
||||
monitor->exit(true, current);
|
||||
monitor->exit(current);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -608,7 +608,7 @@ void ObjectSynchronizer::jni_exit(oop obj, TRAPS) {
|
||||
// intentionally do not use CHECK on check_owner because we must exit the
|
||||
// monitor even if an exception was already pending.
|
||||
if (monitor->check_owner(THREAD)) {
|
||||
monitor->exit(true, current);
|
||||
monitor->exit(current);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user