We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code is generated from the example:
void cachebarFields(JNIEnv *env, jobject lpObject) { if (barFc.cached) return; barFc.clazz = env->GetObjectClass(lpObject); barFc.a = env->GetFieldID(barFc.clazz, "a", "I"); barFc.b = env->GetFieldID(barFc.clazz, "b", "J"); barFc.c = env->GetFieldID(barFc.clazz, "c", "[B"); barFc.c5 = env->GetFieldID(barFc.clazz, "c5", "B"); barFc.prev = env->GetFieldID(barFc.clazz, "prev", "J"); barFc.cached = 1; }
There are no barriers, so readers may observe the write to the "cached" member before the other members.
(One of the barFc.cached checks is redundant, BTW.)
This issue was reported originally in the Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=957181
The text was updated successfully, but these errors were encountered:
Should fix issue #7. We now do a write barrier before setting the 'ca…
d9cd0ab
…ched' field to 1 so that reader don't see this get re-ordered before all the fields are readable.
Upgrade hawtjni version to fix 'Missing barriers in cache initializat…
966bb0f
…ion' fusesource/hawtjni#7
5561d65
No branches or pull requests
The following code is generated from the example:
There are no barriers, so readers may observe the write to the "cached" member before the other members.
(One of the barFc.cached checks is redundant, BTW.)
This issue was reported originally in the Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=957181
The text was updated successfully, but these errors were encountered: