Пример #1
0
 ~MutexUnlockerEx() {
   if (_no_safepoint_check == Mutex::_no_safepoint_check_flag) {
     _mutex->lock_without_safepoint_check();
   } else {
     _mutex->lock();
   }
 }
Пример #2
0
 MutexLockerEx(Monitor * mutex, bool no_safepoint_check = !Mutex::_no_safepoint_check_flag) {
   _mutex = mutex;
   if (_mutex != NULL) {
     assert(mutex->rank() > Mutex::special || no_safepoint_check,
       "Mutexes with rank special or lower should not do safepoint checks");
     if (no_safepoint_check)
       _mutex->lock_without_safepoint_check();
     else
       _mutex->lock();
   }
 }
Пример #3
0
void FreeIdSet::set_safepoint(bool b) {
  _safepoint = b;
  if (b) {
    for (int j = 0; j < NSets; j++) {
      if (_sets[j] != NULL && _sets[j]->_waiters > 0) {
        Monitor* mon = _sets[j]->_mon;
        mon->lock_without_safepoint_check();
        mon->notify_all();
        mon->unlock();
      }
    }
  }
}