Пример #1
0
void
MM_EnvironmentBase::releaseExclusiveVMAccess()
{
	_exclusiveCount--;
	if (0 == _exclusiveCount) {
		reportExclusiveAccessRelease();
		_envLanguageInterface->releaseExclusiveVMAccess();
	}
}
Пример #2
0
void
MM_EnvironmentBase::releaseExclusiveVMAccess()
{
	_exclusiveCount -= 1;
	if (0 == _exclusiveCount) {
		reportExclusiveAccessRelease();
		_delegate.releaseExclusiveVMAccess();
	}
}
Пример #3
0
void
MM_EnvironmentBase::releaseExclusiveForConcurrentKickoff()
{
	MM_GCExtensionsBase *extensions = MM_GCExtensionsBase::getExtensions(_omrVM);

	Assert_MM_true(extensions->gcExclusiveAccessThreadId ==_omrVMThread );
	Assert_MM_true(0 != _exclusiveCount);

	_exclusiveCount -= 1;
	if (0 == _exclusiveCount) {
		omrthread_monitor_enter(extensions->gcExclusiveAccessMutex);
		extensions->gcExclusiveAccessThreadId = NULL;
		omrthread_monitor_notify_all(extensions->gcExclusiveAccessMutex);
		omrthread_monitor_exit(extensions->gcExclusiveAccessMutex);

		reportExclusiveAccessRelease();
		_envLanguageInterface->releaseExclusiveVMAccess();
	}
}
Пример #4
0
void
MM_EnvironmentBase::releaseExclusiveVMAccessForGC()
{
	MM_GCExtensionsBase *extensions = MM_GCExtensionsBase::getExtensions(_omrVM);

	Assert_MM_true(extensions->gcExclusiveAccessThreadId == _omrVMThread);
	Assert_MM_true(0 != _exclusiveCount);

	_exclusiveCount -= 1;
	if (0 == _exclusiveCount) {
		omrthread_monitor_enter(extensions->gcExclusiveAccessMutex);
		extensions->gcExclusiveAccessThreadId = _cachedGCExclusiveAccessThreadId;
		_cachedGCExclusiveAccessThreadId = NULL;
		omrthread_monitor_notify_all(extensions->gcExclusiveAccessMutex);
		omrthread_monitor_exit(extensions->gcExclusiveAccessMutex);
		reportExclusiveAccessRelease();
		_delegate.releaseExclusiveVMAccess();
	}
}
Пример #5
0
void
MM_EnvironmentBase::unwindExclusiveVMAccessForGC()
{
	MM_GCExtensionsBase *extensions = MM_GCExtensionsBase::getExtensions(_omrVM);

	if(_exclusiveCount > 0) {
		Assert_MM_true(extensions->gcExclusiveAccessThreadId == _omrVMThread);

		_exclusiveCount = 0;

		omrthread_monitor_enter(extensions->gcExclusiveAccessMutex);
		extensions->gcExclusiveAccessThreadId = NULL;
		omrthread_monitor_notify_all(extensions->gcExclusiveAccessMutex);
		omrthread_monitor_exit(extensions->gcExclusiveAccessMutex);

		reportExclusiveAccessRelease();

		_envLanguageInterface->releaseExclusiveVMAccess();
	}
}