Commit 71b34325 authored by Ivo Anjo's avatar Ivo Anjo

Support explicit aborts inside doTransactionally instead of repeating transaction

parent ba078850
......@@ -425,11 +425,13 @@ JNIEXPORT jobject JNICALL Java_javartm_Transaction_doTransactionally(JNIEnv *env
}
for (int i = 0; i < RETRIES; i++) {
if (warmup || (begin() == _XBEGIN_STARTED)) {
int status = 0;
if (warmup || ((status = begin()) == _XBEGIN_STARTED)) {
jobject retValue = (*env)->CallObjectMethod(env, runnable, runMethodId);
if (!warmup) _xend();
return retValue;
}
if (status & _XABORT_EXPLICIT) break;
}
return NULL;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment