< prev index next > test/jdk/java/foreign/TestUpcallHighArity.java
Print this page
*
*/
/*
* @test
- * @enablePreview
- * @requires jdk.foreign.linker != "UNSUPPORTED"
* @modules java.base/jdk.internal.foreign
* @build NativeTestHelper CallGeneratorHelper TestUpcallHighArity
*
* @run testng/othervm/native
* --enable-native-access=ALL-UNNAMED
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
public class TestUpcallHighArity extends CallGeneratorHelper {
static final MethodHandle MH_do_upcall;
- static final Linker LINKER = Linker.nativeLinker();
-
- // struct S_PDI { void* p0; double p1; int p2; };
- static final MemoryLayout S_PDI_LAYOUT = MemoryLayout.structLayout(
- C_POINTER.withName("p0"),
- C_DOUBLE.withName("p1"),
- C_INT.withName("p2"),
- MemoryLayout.paddingLayout(4)
- );
static {
System.loadLibrary("TestUpcallHighArity");
MH_do_upcall = LINKER.downcallHandle(
findNativeOrThrow("do_upcall"),
< prev index next >