Example #1
0
 ~MutexUnlockerEx() {
   if (_no_safepoint_check == Mutex::_no_safepoint_check_flag) {
     _mutex->lock_without_safepoint_check();
   } else {
     _mutex->lock();
   }
 }
Example #2
0
 VerifyMutexLocker(Monitor * mutex) {
   _mutex     = mutex;
   _reentrant = mutex->owned_by_self();
   if (!_reentrant) {
     // We temp. diable strict safepoint checking, while we require the lock
     FlagSetting fs(StrictSafepointChecks, false);
     _mutex->lock();
   }
 }
Example #3
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();
   }
 }
Example #4
0
 ~MutexUnlocker() {
   _mutex->lock();
 }
Example #5
0
 // Overloaded constructor passing current thread
 MutexLocker(Monitor * mutex, Thread *thread) {
   assert(mutex->rank() != Mutex::special,
     "Special ranked mutex should only use MutexLockerEx");
   _mutex = mutex;
   _mutex->lock(thread);
 }