[crac] RFR: RCU Lock - RW lock with very lightweight read- and heavyweight write-locking [v2]
Dan Heidinga
heidinga at openjdk.org
Wed Apr 12 12:30:04 UTC 2023
On Wed, 12 Apr 2023 12:27:14 GMT, Radim Vansa <duke at openjdk.org> wrote:
>> This implementation is suitable for uses where the write-locking happens very rarely (if at all), as in the case of CRaC checkpoint, and we don't want to slow down regular access to the protected resource.
>
> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>
> Reuse MethodHandles.lookup()
>
> Co-authored-by: Dan Heidinga <heidinga at redhat.com>
src/java.base/share/native/libjava/RCULock.c line 70:
> 68: }
> 69: for (int i = 0; i < num; ++i) {
> 70: jobject el = (*env)->GetObjectArrayElement(env, methods, i);
I think for correctness, this needs to be followed by an exception check
if ((*env)->ExceptionOccurred(env)) {
free_up_to(c_methods, i);
// exception already pending
return;
}
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/58#discussion_r1164062255
More information about the crac-dev
mailing list