8268279: gc/shenandoah/compiler/TestLinkToNativeRBP.java fails after LibraryLookup is gone
Reviewed-by: zgu, jiefu
This commit is contained in:
parent
b05fa02e74
commit
2aeeeb40a0
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
import jdk.incubator.foreign.CLinker;
|
import jdk.incubator.foreign.CLinker;
|
||||||
import jdk.incubator.foreign.FunctionDescriptor;
|
import jdk.incubator.foreign.FunctionDescriptor;
|
||||||
import jdk.incubator.foreign.LibraryLookup;
|
import jdk.incubator.foreign.SymbolLookup;
|
||||||
|
|
||||||
import java.lang.invoke.MethodHandle;
|
import java.lang.invoke.MethodHandle;
|
||||||
import java.lang.invoke.MethodType;
|
import java.lang.invoke.MethodType;
|
||||||
@ -47,8 +47,12 @@ import java.lang.invoke.MethodType;
|
|||||||
import static jdk.incubator.foreign.CLinker.C_INT;
|
import static jdk.incubator.foreign.CLinker.C_INT;
|
||||||
|
|
||||||
public class TestLinkToNativeRBP {
|
public class TestLinkToNativeRBP {
|
||||||
|
static {
|
||||||
|
System.loadLibrary("LinkToNativeRBP");
|
||||||
|
}
|
||||||
|
|
||||||
final static CLinker abi = CLinker.getInstance();
|
final static CLinker abi = CLinker.getInstance();
|
||||||
static final LibraryLookup lookup = LibraryLookup.ofLibrary("LinkToNativeRBP");
|
static final SymbolLookup lookup = SymbolLookup.loaderLookup();
|
||||||
final static MethodHandle foo = abi.downcallHandle(lookup.lookup("foo").get(),
|
final static MethodHandle foo = abi.downcallHandle(lookup.lookup("foo").get(),
|
||||||
MethodType.methodType(int.class),
|
MethodType.methodType(int.class),
|
||||||
FunctionDescriptor.of(C_INT));
|
FunctionDescriptor.of(C_INT));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user