@@ -388,6 +388,7 @@ bool ObjectMonitor::enter(JavaThread* current) {
388
388
{ // Change java thread status to indicate blocked on monitor enter.
389
389
JavaThreadBlockedOnMonitorEnterState jtbmes (current, this );
390
390
391
+ assert (current->current_pending_monitor () == NULL , " invariant" );
391
392
current->set_current_pending_monitor (this );
392
393
393
394
DTRACE_MONITOR_PROBE (contended__enter, this , object (), current);
@@ -421,7 +422,7 @@ bool ObjectMonitor::enter(JavaThread* current) {
421
422
//
422
423
_recursions = 0 ;
423
424
_succ = NULL ;
424
- exit (false , current );
425
+ exit (current, false /* not_suspended */ );
425
426
426
427
current->java_suspend_self ();
427
428
}
@@ -1139,7 +1140,7 @@ void ObjectMonitor::UnlinkAfterAcquire(JavaThread* current, ObjectWaiter* curren
1139
1140
// structured the code so the windows are short and the frequency
1140
1141
// of such futile wakups is low.
1141
1142
1142
- void ObjectMonitor::exit (bool not_suspended, JavaThread* current) {
1143
+ void ObjectMonitor::exit (JavaThread* current, bool not_suspended ) {
1143
1144
void * cur = owner_raw ();
1144
1145
if (current != cur) {
1145
1146
if (current->is_lock_owned ((address)cur)) {
@@ -1372,7 +1373,7 @@ intx ObjectMonitor::complete_exit(JavaThread* current) {
1372
1373
guarantee (current == owner_raw (), " complete_exit not owner" );
1373
1374
intx save = _recursions; // record the old recursion count
1374
1375
_recursions = 0 ; // set the recursion level to be 0
1375
- exit (true , current); // exit the monitor
1376
+ exit (current); // exit the monitor
1376
1377
guarantee (owner_raw () != current, " invariant" );
1377
1378
return save;
1378
1379
}
@@ -1506,7 +1507,7 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
1506
1507
intx save = _recursions; // record the old recursion count
1507
1508
_waiters++; // increment the number of waiters
1508
1509
_recursions = 0 ; // set the recursion level to be 1
1509
- exit (true , current); // exit the monitor
1510
+ exit (current); // exit the monitor
1510
1511
guarantee (owner_raw () != current, " invariant" );
1511
1512
1512
1513
// The thread is on the WaitSet list - now park() it.
0 commit comments