8154529: some places in the invoke.c that use InvokeRequest* not protected with invokerLock

Reviewed-by: sspitsyn
This commit is contained in:
Severin Gehwolf 2016-04-25 15:32:35 +02:00
parent 8f5fb772b4
commit 90ab13c3cc
2 changed files with 7 additions and 15 deletions

View File

@ -277,12 +277,14 @@ invoker_enableInvokeRequests(jthread thread)
JDI_ASSERT(thread);
debugMonitorEnter(invokerLock);
request = threadControl_getInvokeRequest(thread);
if (request == NULL) {
EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request");
}
request->available = JNI_TRUE;
debugMonitorExit(invokerLock);
}
jvmtiError
@ -738,30 +740,21 @@ invoker_completeInvokeRequest(jthread thread)
}
}
jboolean
invoker_isPending(jthread thread)
{
InvokeRequest *request;
JDI_ASSERT(thread);
request = threadControl_getInvokeRequest(thread);
if (request == NULL) {
EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request");
}
return request->pending;
}
jboolean
invoker_isEnabled(jthread thread)
{
InvokeRequest *request;
jboolean isEnabled;
JDI_ASSERT(thread);
debugMonitorEnter(invokerLock);
request = threadControl_getInvokeRequest(thread);
if (request == NULL) {
EXIT_ERROR(AGENT_ERROR_INVALID_THREAD, "getting thread invoke request");
}
return request->available;
isEnabled = request->available;
debugMonitorExit(invokerLock);
return isEnabled;
}
void

View File

@ -67,7 +67,6 @@ jvmtiError invoker_requestInvoke(jbyte invokeType, jbyte options, jint id,
jboolean invoker_doInvoke(jthread thread);
void invoker_completeInvokeRequest(jthread thread);
jboolean invoker_isPending(jthread thread);
jboolean invoker_isEnabled(jthread thread);
void invoker_detach(InvokeRequest *request);