Skip to content

Commit

Permalink
svm: adopt "JDK-8310644: Make panama memory segment close use async h…
Browse files Browse the repository at this point in the history
…andshakes"
  • Loading branch information
zapster committed Dec 1, 2023
1 parent 207e120 commit 9c1165c
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import com.oracle.svm.core.annotate.TargetElement;
import com.oracle.svm.core.jdk.JDK21OrEarlier;
import com.oracle.svm.core.jdk.JDK22OrLater;

import jdk.internal.foreign.MemorySessionImpl;

Expand Down Expand Up @@ -65,7 +68,18 @@ static void registerNatives() {
* As one might notice, what is not supported is not creating shared arenas, but closing them.
*/
@Substitute
@TargetElement(onlyWith = JDK22OrLater.class)
void closeScope0(MemorySessionImpl session, Target_jdk_internal_misc_ScopedMemoryAccess_ScopedAccessError error) {
throw unsupportedFeature("Arena.ofShared is not yet supported.");
}

@Substitute
@TargetElement(onlyWith = JDK21OrEarlier.class)
boolean closeScope0(MemorySessionImpl session) {
throw unsupportedFeature("Arena.ofShared is not yet supported.");
}
}

@TargetClass(className = "jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError", onlyWith = JDK22OrLater.class)
final class Target_jdk_internal_misc_ScopedMemoryAccess_ScopedAccessError {
}

0 comments on commit 9c1165c

Please sign in to comment.