From 3a1a49017f7fe3a5000cea0afea6333df2411a61 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 4 Aug 2023 17:31:30 +0200 Subject: [PATCH] adjust windows package to JDK 21 --- jfuse-win/pom.xml | 4 +- .../cryptomator/jfuse/win/DirFillerImpl.java | 6 +- .../cryptomator/jfuse/win/FileInfoImpl.java | 8 +- .../org/cryptomator/jfuse/win/FuseArgs.java | 4 +- .../cryptomator/jfuse/win/FuseConfigImpl.java | 6 +- .../jfuse/win/FuseConnInfoImpl.java | 6 +- .../org/cryptomator/jfuse/win/FuseImpl.java | 158 +- .../cryptomator/jfuse/win/FuseMountImpl.java | 4 +- .../org/cryptomator/jfuse/win/StatImpl.java | 6 +- .../cryptomator/jfuse/win/StatvfsImpl.java | 6 +- .../cryptomator/jfuse/win/TimeSpecImpl.java | 2 +- .../org/cryptomator/jfuse/win/WinErrno.java | 2 +- .../jfuse/win/extr/Constants$root.java | 25 - .../jfuse/win/extr/constants$0.java | 58 - .../jfuse/win/extr/constants$1.java | 52 - .../win/extr/{ => errno}/RuntimeHelper.java | 33 +- .../jfuse/win/extr/errno/constants$0.java | 16 + .../jfuse/win/extr/{ => errno}/errno_h.java | 18 +- .../jfuse/win/extr/fcntl/RuntimeHelper.java | 245 ++ .../jfuse/win/extr/fcntl/constants$0.java | 16 + .../jfuse/win/extr/{ => fcntl}/fcntl_h.java | 18 +- .../jfuse/win/extr/fuse2/Constants$root.java | 25 - .../jfuse/win/extr/fuse2/RuntimeHelper.java | 31 +- .../jfuse/win/extr/fuse2/constants$0.java | 24 +- .../jfuse/win/extr/fuse2/fuse2_h.java | 18 +- .../jfuse/win/extr/fuse2/fuse_args.java | 44 +- .../jfuse/win/extr/fuse3/RuntimeHelper.java | 245 ++ .../jfuse/win/extr/fuse3/constants$0.java | 56 + .../jfuse/win/extr/fuse3/constants$1.java | 22 + .../jfuse/win/extr/fuse3/constants$10.java | 22 + .../jfuse/win/extr/fuse3/constants$11.java | 22 + .../jfuse/win/extr/fuse3/constants$12.java | 69 + .../jfuse/win/extr/fuse3/constants$13.java | 32 + .../jfuse/win/extr/fuse3/constants$14.java | 29 + .../jfuse/win/extr/fuse3/constants$15.java | 26 + .../jfuse/win/extr/fuse3/constants$16.java | 31 + .../jfuse/win/extr/fuse3/constants$17.java | 28 + .../jfuse/win/extr/fuse3/constants$18.java | 31 + .../jfuse/win/extr/fuse3/constants$19.java | 28 + .../jfuse/win/extr/fuse3/constants$2.java | 34 + .../jfuse/win/extr/fuse3/constants$20.java | 30 + .../jfuse/win/extr/fuse3/constants$21.java | 22 + .../jfuse/win/extr/fuse3/constants$22.java | 27 + .../jfuse/win/extr/fuse3/constants$23.java | 24 + .../jfuse/win/extr/fuse3/constants$24.java | 31 + .../jfuse/win/extr/fuse3/constants$25.java | 25 + .../jfuse/win/extr/fuse3/constants$26.java | 28 + .../jfuse/win/extr/fuse3/constants$27.java | 27 + .../jfuse/win/extr/fuse3/constants$28.java | 24 + .../jfuse/win/extr/fuse3/constants$29.java | 36 + .../jfuse/win/extr/fuse3/constants$3.java | 22 + .../jfuse/win/extr/fuse3/constants$30.java | 31 + .../jfuse/win/extr/fuse3/constants$31.java | 28 + .../jfuse/win/extr/fuse3/constants$32.java | 38 + .../jfuse/win/extr/fuse3/constants$33.java | 43 + .../jfuse/win/extr/fuse3/constants$4.java | 29 + .../jfuse/win/extr/fuse3/constants$5.java | 37 + .../jfuse/win/extr/fuse3/constants$6.java | 22 + .../jfuse/win/extr/fuse3/constants$7.java | 30 + .../jfuse/win/extr/fuse3/constants$8.java | 48 + .../jfuse/win/extr/fuse3/constants$9.java | 22 + .../win/extr/{ => fuse3}/fuse3_config.java | 297 +- .../win/extr/{ => fuse3}/fuse3_conn_info.java | 129 +- .../win/extr/{ => fuse3}/fuse3_file_info.java | 68 +- .../extr/{ => fuse3}/fuse3_fill_dir_t.java | 12 +- .../extr/{ => fuse3}/fuse3_loop_config.java | 32 +- .../win/extr/fuse3/fuse3_operations.java | 2189 ++++++++++++++ .../jfuse/win/extr/{ => fuse3}/fuse_h.java | 36 +- .../jfuse/win/extr/{ => fuse3}/fuse_stat.java | 148 +- .../win/extr/{ => fuse3}/fuse_statvfs.java | 140 +- .../win/extr/{ => fuse3}/fuse_timespec.java | 32 +- .../jfuse/win/extr/fuse3_operations.java | 2594 ----------------- .../jfuse/win/FileInfoImplTest.java | 6 +- .../jfuse/win/FuseConfigImplTest.java | 6 +- .../jfuse/win/FuseConnInfoImplTest.java | 10 +- .../cryptomator/jfuse/win/FuseImplTest.java | 38 +- .../cryptomator/jfuse/win/StatImplTest.java | 10 +- .../jfuse/win/TimeSpecImplTest.java | 10 +- 78 files changed, 4379 insertions(+), 3512 deletions(-) delete mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/Constants$root.java delete mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$0.java delete mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$1.java rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => errno}/RuntimeHelper.java (88%) create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/constants$0.java rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => errno}/errno_h.java (79%) create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/RuntimeHelper.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/constants$0.java rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fcntl}/fcntl_h.java (65%) delete mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/Constants$root.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/RuntimeHelper.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$0.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$1.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$10.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$11.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$12.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$13.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$14.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$15.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$16.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$17.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$18.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$19.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$2.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$20.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$21.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$22.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$23.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$24.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$25.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$26.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$27.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$28.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$29.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$3.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$30.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$31.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$32.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$33.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$4.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$5.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$6.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$7.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$8.java create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$9.java rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse3_config.java (54%) rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse3_conn_info.java (55%) rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse3_file_info.java (52%) rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse3_fill_dir_t.java (63%) rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse3_loop_config.java (57%) create mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_operations.java rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse_h.java (74%) rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse_stat.java (54%) rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse_statvfs.java (56%) rename jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/{ => fuse3}/fuse_timespec.java (58%) delete mode 100644 jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_operations.java diff --git a/jfuse-win/pom.xml b/jfuse-win/pom.xml index 44569e09..60d296e4 100644 --- a/jfuse-win/pom.xml +++ b/jfuse-win/pom.xml @@ -76,7 +76,7 @@ ${jextract.executable} ${win.ucrtHeaderPath} ${project.build.sourceDirectory} - org.cryptomator.jfuse.win.extr + org.cryptomator.jfuse.win.extr.fuse3 @@ -145,6 +145,7 @@ sources + org.cryptomator.jfuse.win.extr.errno ${win.ucrtHeaderPath}/errno.h errno_h @@ -173,6 +174,7 @@ sources + org.cryptomator.jfuse.win.extr.fcntl ${win.ucrtHeaderPath}/fcntl.h fcntl_h diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/DirFillerImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/DirFillerImpl.java index edc496e8..e20ee4d3 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/DirFillerImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/DirFillerImpl.java @@ -2,8 +2,8 @@ import org.cryptomator.jfuse.api.DirFiller; import org.cryptomator.jfuse.api.Stat; -import org.cryptomator.jfuse.win.extr.fuse3_fill_dir_t; -import org.cryptomator.jfuse.win.extr.fuse_stat; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_fill_dir_t; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_stat; import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; @@ -12,7 +12,7 @@ record DirFillerImpl(MemorySegment buf, fuse3_fill_dir_t callback, Arena arena) implements DirFiller { DirFillerImpl(MemorySegment buf, MemorySegment callback, Arena arena) { - this(buf, fuse3_fill_dir_t.ofAddress(callback, arena.scope()), arena); + this(buf, fuse3_fill_dir_t.ofAddress(callback, arena), arena); } @Override diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FileInfoImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FileInfoImpl.java index 39ba56f9..33e9c17f 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FileInfoImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FileInfoImpl.java @@ -1,11 +1,11 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.FileInfo; -import org.cryptomator.jfuse.win.extr.fcntl_h; -import org.cryptomator.jfuse.win.extr.fuse3_file_info; +import org.cryptomator.jfuse.win.extr.fcntl.fcntl_h; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_file_info; +import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; -import java.lang.foreign.SegmentScope; import java.nio.file.StandardOpenOption; import java.util.EnumSet; import java.util.Set; @@ -20,7 +20,7 @@ record FileInfoImpl(MemorySegment segment) implements FileInfo { private static final int O_TRUNC = fcntl_h.O_TRUNC(); private static final int O_EXCL = fcntl_h.O_EXCL(); - public FileInfoImpl(MemorySegment address, SegmentScope scope) { + public FileInfoImpl(MemorySegment address, Arena scope) { this(fuse3_file_info.ofAddress(address, scope)); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseArgs.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseArgs.java index 5721a1b7..e81f29eb 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseArgs.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseArgs.java @@ -14,10 +14,10 @@ public String toString() { var argc = fuse_args.argc$get(args); var argv = fuse_args.argv$get(args); for (int i = 0; i < argc; i++) { - var cString = argv.getAtIndex(ValueLayout.ADDRESS.asUnbounded(), i); + var cString = argv.getAtIndex(ValueLayout.ADDRESS.withoutTargetLayout().withName("arg[%d]".formatted(i)), i).reinterpret(Long.MAX_VALUE); sb.append("arg[").append(i).append("] = ").append(cString.getUtf8String(0)).append(", "); } - sb.append("mountPoint = ").append(mountPoint().getUtf8String(0)); + sb.append("mountPoint = ").append(mountPoint().reinterpret(Long.MAX_VALUE).getUtf8String(0)).append(", "); sb.append("singlethreaded = ").append(!multiThreaded); return sb.toString(); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConfigImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConfigImpl.java index 69a2073e..7c4889f9 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConfigImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConfigImpl.java @@ -1,14 +1,14 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.FuseConfig; -import org.cryptomator.jfuse.win.extr.fuse3_config; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_config; +import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; -import java.lang.foreign.SegmentScope; record FuseConfigImpl(MemorySegment segment) implements FuseConfig { - public FuseConfigImpl(MemorySegment address, SegmentScope scope) { + public FuseConfigImpl(MemorySegment address, Arena scope) { this(fuse3_config.ofAddress(address, scope)); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConnInfoImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConnInfoImpl.java index 5d4c393e..8893f719 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConnInfoImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseConnInfoImpl.java @@ -1,14 +1,14 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.FuseConnInfo; -import org.cryptomator.jfuse.win.extr.fuse3_conn_info; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_conn_info; +import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; -import java.lang.foreign.SegmentScope; record FuseConnInfoImpl(MemorySegment segment) implements FuseConnInfo { - public FuseConnInfoImpl(MemorySegment address, SegmentScope scope) { + public FuseConnInfoImpl(MemorySegment address, Arena scope) { this(fuse3_conn_info.ofAddress(address, scope)); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseImpl.java index 8d1586e9..7f1ed665 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseImpl.java @@ -7,9 +7,9 @@ import org.cryptomator.jfuse.api.FuseOperations; import org.cryptomator.jfuse.win.extr.fuse2.fuse2_h; import org.cryptomator.jfuse.win.extr.fuse2.fuse_args; -import org.cryptomator.jfuse.win.extr.fuse3_operations; -import org.cryptomator.jfuse.win.extr.fuse_h; -import org.cryptomator.jfuse.win.extr.fuse_timespec; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_operations; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_h; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_timespec; import org.jetbrains.annotations.VisibleForTesting; import java.lang.foreign.Arena; @@ -20,6 +20,7 @@ import java.util.List; import static java.lang.foreign.ValueLayout.JAVA_INT; +import static java.lang.foreign.ValueLayout.JAVA_LONG; class FuseImpl extends Fuse { @@ -72,73 +73,73 @@ FuseArgs parseArgs(List cmdLineArgs) throws IllegalArgumentException { throw new IllegalArgumentException("fuse_parse_cmdline failed to parse " + String.join(" ", cmdLineArgs)); } var isMultiThreaded = multithreaded.get(JAVA_INT, 0) == 1; - var mountPoint = mountPointPtr.get(ValueLayout.ADDRESS.asUnbounded(), 0); + var mountPoint = mountPointPtr.get(ValueLayout.ADDRESS.withoutTargetLayout().withName("mountpoint"), 0); return new FuseArgs(args, mountPoint, isMultiThreaded); } @Override protected void bind(FuseOperations.Operation operation) { switch (operation) { - case INIT -> fuse3_operations.init$set(fuseOperationsStruct, fuse3_operations.init.allocate(this::init, fuseArena.scope())); + case INIT -> fuse3_operations.init$set(fuseOperationsStruct, fuse3_operations.init.allocate(this::init, fuseArena)); case ACCESS -> fuse3_operations.access$set(fuseOperationsStruct, MemorySegment.NULL); - case CHMOD -> fuse3_operations.chmod$set(fuseOperationsStruct, fuse3_operations.chmod.allocate(this::chmod, fuseArena.scope())); - case CHOWN -> fuse3_operations.chown$set(fuseOperationsStruct, fuse3_operations.chown.allocate(this::chown, fuseArena.scope())); - case CREATE -> fuse3_operations.create$set(fuseOperationsStruct, fuse3_operations.create.allocate(this::create, fuseArena.scope())); - case DESTROY -> fuse3_operations.destroy$set(fuseOperationsStruct, fuse3_operations.destroy.allocate(this::destroy, fuseArena.scope())); - case FLUSH -> fuse3_operations.flush$set(fuseOperationsStruct, fuse3_operations.flush.allocate(this::flush, fuseArena.scope())); - case FSYNC -> fuse3_operations.fsync$set(fuseOperationsStruct, fuse3_operations.fsync.allocate(this::fsync, fuseArena.scope())); - case FSYNCDIR -> fuse3_operations.fsyncdir$set(fuseOperationsStruct, fuse3_operations.fsyncdir.allocate(this::fsyncdir, fuseArena.scope())); - case GET_ATTR -> fuse3_operations.getattr$set(fuseOperationsStruct, fuse3_operations.getattr.allocate(this::getattr, fuseArena.scope())); - case GET_XATTR -> fuse3_operations.getxattr$set(fuseOperationsStruct, fuse3_operations.getxattr.allocate(this::getxattr, fuseArena.scope())); - case LIST_XATTR -> fuse3_operations.listxattr$set(fuseOperationsStruct, fuse3_operations.listxattr.allocate(this::listxattr, fuseArena.scope())); - case MKDIR -> fuse3_operations.mkdir$set(fuseOperationsStruct, fuse3_operations.mkdir.allocate(this::mkdir, fuseArena.scope())); - case OPEN -> fuse3_operations.open$set(fuseOperationsStruct, fuse3_operations.open.allocate(this::open, fuseArena.scope())); - case OPEN_DIR -> fuse3_operations.opendir$set(fuseOperationsStruct, fuse3_operations.opendir.allocate(this::opendir, fuseArena.scope())); - case READ -> fuse3_operations.read$set(fuseOperationsStruct, fuse3_operations.read.allocate(this::read, fuseArena.scope())); - case READ_DIR -> fuse3_operations.readdir$set(fuseOperationsStruct, fuse3_operations.readdir.allocate(this::readdir, fuseArena.scope())); - case READLINK -> fuse3_operations.readlink$set(fuseOperationsStruct, fuse3_operations.readlink.allocate(this::readlink, fuseArena.scope())); - case RELEASE -> fuse3_operations.release$set(fuseOperationsStruct, fuse3_operations.release.allocate(this::release, fuseArena.scope())); - case RELEASE_DIR -> fuse3_operations.releasedir$set(fuseOperationsStruct, fuse3_operations.releasedir.allocate(this::releasedir, fuseArena.scope())); - case REMOVE_XATTR -> fuse3_operations.removexattr$set(fuseOperationsStruct, fuse3_operations.removexattr.allocate(this::removexattr, fuseArena.scope())); - case RENAME -> fuse3_operations.rename$set(fuseOperationsStruct, fuse3_operations.rename.allocate(this::rename, fuseArena.scope())); - case RMDIR -> fuse3_operations.rmdir$set(fuseOperationsStruct, fuse3_operations.rmdir.allocate(this::rmdir, fuseArena.scope())); - case SET_XATTR -> fuse3_operations.setxattr$set(fuseOperationsStruct, fuse3_operations.setxattr.allocate(this::setxattr, fuseArena.scope())); - case STATFS -> fuse3_operations.statfs$set(fuseOperationsStruct, fuse3_operations.statfs.allocate(this::statfs, fuseArena.scope())); - case SYMLINK -> fuse3_operations.symlink$set(fuseOperationsStruct, fuse3_operations.symlink.allocate(this::symlink, fuseArena.scope())); - case TRUNCATE -> fuse3_operations.truncate$set(fuseOperationsStruct, fuse3_operations.truncate.allocate(this::truncate, fuseArena.scope())); - case UNLINK -> fuse3_operations.unlink$set(fuseOperationsStruct, fuse3_operations.unlink.allocate(this::unlink, fuseArena.scope())); - case UTIMENS -> fuse3_operations.utimens$set(fuseOperationsStruct, fuse3_operations.utimens.allocate(this::utimens, fuseArena.scope())); - case WRITE -> fuse3_operations.write$set(fuseOperationsStruct, fuse3_operations.write.allocate(this::write, fuseArena.scope())); + case CHMOD -> fuse3_operations.chmod$set(fuseOperationsStruct, fuse3_operations.chmod.allocate(this::chmod, fuseArena)); + case CHOWN -> fuse3_operations.chown$set(fuseOperationsStruct, fuse3_operations.chown.allocate(this::chown, fuseArena)); + case CREATE -> fuse3_operations.create$set(fuseOperationsStruct, fuse3_operations.create.allocate(this::create, fuseArena)); + case DESTROY -> fuse3_operations.destroy$set(fuseOperationsStruct, fuse3_operations.destroy.allocate(this::destroy, fuseArena)); + case FLUSH -> fuse3_operations.flush$set(fuseOperationsStruct, fuse3_operations.flush.allocate(this::flush, fuseArena)); + case FSYNC -> fuse3_operations.fsync$set(fuseOperationsStruct, fuse3_operations.fsync.allocate(this::fsync, fuseArena)); + case FSYNCDIR -> fuse3_operations.fsyncdir$set(fuseOperationsStruct, fuse3_operations.fsyncdir.allocate(this::fsyncdir, fuseArena)); + case GET_ATTR -> fuse3_operations.getattr$set(fuseOperationsStruct, fuse3_operations.getattr.allocate(this::getattr, fuseArena)); + case GET_XATTR -> fuse3_operations.getxattr$set(fuseOperationsStruct, fuse3_operations.getxattr.allocate(this::getxattr, fuseArena)); + case LIST_XATTR -> fuse3_operations.listxattr$set(fuseOperationsStruct, fuse3_operations.listxattr.allocate(this::listxattr, fuseArena)); + case MKDIR -> fuse3_operations.mkdir$set(fuseOperationsStruct, fuse3_operations.mkdir.allocate(this::mkdir, fuseArena)); + case OPEN -> fuse3_operations.open$set(fuseOperationsStruct, fuse3_operations.open.allocate(this::open, fuseArena)); + case OPEN_DIR -> fuse3_operations.opendir$set(fuseOperationsStruct, fuse3_operations.opendir.allocate(this::opendir, fuseArena)); + case READ -> fuse3_operations.read$set(fuseOperationsStruct, fuse3_operations.read.allocate(this::read, fuseArena)); + case READ_DIR -> fuse3_operations.readdir$set(fuseOperationsStruct, fuse3_operations.readdir.allocate(this::readdir, fuseArena)); + case READLINK -> fuse3_operations.readlink$set(fuseOperationsStruct, fuse3_operations.readlink.allocate(this::readlink, fuseArena)); + case RELEASE -> fuse3_operations.release$set(fuseOperationsStruct, fuse3_operations.release.allocate(this::release, fuseArena)); + case RELEASE_DIR -> fuse3_operations.releasedir$set(fuseOperationsStruct, fuse3_operations.releasedir.allocate(this::releasedir, fuseArena)); + case REMOVE_XATTR -> fuse3_operations.removexattr$set(fuseOperationsStruct, fuse3_operations.removexattr.allocate(this::removexattr, fuseArena)); + case RENAME -> fuse3_operations.rename$set(fuseOperationsStruct, fuse3_operations.rename.allocate(this::rename, fuseArena)); + case RMDIR -> fuse3_operations.rmdir$set(fuseOperationsStruct, fuse3_operations.rmdir.allocate(this::rmdir, fuseArena)); + case SET_XATTR -> fuse3_operations.setxattr$set(fuseOperationsStruct, fuse3_operations.setxattr.allocate(this::setxattr, fuseArena)); + case STATFS -> fuse3_operations.statfs$set(fuseOperationsStruct, fuse3_operations.statfs.allocate(this::statfs, fuseArena)); + case SYMLINK -> fuse3_operations.symlink$set(fuseOperationsStruct, fuse3_operations.symlink.allocate(this::symlink, fuseArena)); + case TRUNCATE -> fuse3_operations.truncate$set(fuseOperationsStruct, fuse3_operations.truncate.allocate(this::truncate, fuseArena)); + case UNLINK -> fuse3_operations.unlink$set(fuseOperationsStruct, fuse3_operations.unlink.allocate(this::unlink, fuseArena)); + case UTIMENS -> fuse3_operations.utimens$set(fuseOperationsStruct, fuse3_operations.utimens.allocate(this::utimens, fuseArena)); + case WRITE -> fuse3_operations.write$set(fuseOperationsStruct, fuse3_operations.write.allocate(this::write, fuseArena)); } } @VisibleForTesting MemorySegment init(MemorySegment conn, MemorySegment cfg) { - try (var arena = Arena.openConfined()) { - var connInfo = new FuseConnInfoImpl(conn, arena.scope()); + try (var arena = Arena.ofConfined()) { + var connInfo = new FuseConnInfoImpl(conn, arena); connInfo.setWant(connInfo.want() | FuseConnInfo.FUSE_CAP_READDIRPLUS); - var config = new FuseConfigImpl(cfg, arena.scope()); + var config = new FuseConfigImpl(cfg, arena); fuseOperations.init(connInfo, config); } return MemorySegment.NULL; } private int chmod(MemorySegment path, int mode, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.chmod(path.getUtf8String(0), mode, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.chmod(path.getUtf8String(0), mode, new FileInfoImpl(fi, arena)); } } @VisibleForTesting int chown(MemorySegment path, int uid, int gid, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.chown(path.getUtf8String(0), uid, gid, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.chown(path.getUtf8String(0), uid, gid, new FileInfoImpl(fi, arena)); } } private int create(MemorySegment path, int mode, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.create(path.getUtf8String(0), mode, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.create(path.getUtf8String(0), mode, new FileInfoImpl(fi, arena)); } } @@ -148,42 +149,42 @@ private void destroy(MemorySegment addr) { @VisibleForTesting int flush(MemorySegment path, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.flush(path.getUtf8String(0), new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.flush(path.getUtf8String(0), new FileInfoImpl(fi, arena)); } } @VisibleForTesting int fsync(MemorySegment path, int datasync, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.fsync(path.getUtf8String(0), datasync, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.fsync(path.getUtf8String(0), datasync, new FileInfoImpl(fi, arena)); } } @VisibleForTesting int fsyncdir(MemorySegment path, int datasync, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.fsyncdir(path.getUtf8String(0), datasync, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.fsyncdir(path.getUtf8String(0), datasync, new FileInfoImpl(fi, arena)); } } @VisibleForTesting int getattr(MemorySegment path, MemorySegment stat, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.getattr(path.getUtf8String(0), new StatImpl(stat, arena.scope()), new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.getattr(path.getUtf8String(0), new StatImpl(stat, arena), new FileInfoImpl(fi, arena)); } } @VisibleForTesting int getxattr(MemorySegment path, MemorySegment name, MemorySegment value, long size) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { return fuseOperations.getxattr(path.getUtf8String(0), name.getUtf8String(0), value.asSlice(0, size).asByteBuffer()); } } @VisibleForTesting int setxattr(MemorySegment path, MemorySegment name, MemorySegment value, long size, int flags) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { return fuseOperations.setxattr(path.getUtf8String(0), name.getUtf8String(0), value.asSlice(0, size).asByteBuffer(), flags); } @@ -191,7 +192,7 @@ int setxattr(MemorySegment path, MemorySegment name, MemorySegment value, long s @VisibleForTesting int listxattr(MemorySegment path, MemorySegment value, long size) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { return fuseOperations.listxattr(path.getUtf8String(0), value.asSlice(0, size).asByteBuffer()); } } @@ -206,46 +207,47 @@ private int mkdir(MemorySegment path, int mode) { } private int open(MemorySegment path, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.open(path.getUtf8String(0), new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.open(path.getUtf8String(0), new FileInfoImpl(fi, arena)); } } private int opendir(MemorySegment path, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.opendir(path.getUtf8String(0), new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.opendir(path.getUtf8String(0), new FileInfoImpl(fi, arena)); } } private int read(MemorySegment path, MemorySegment buf, long size, long offset, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - var buffer = MemorySegment.ofAddress(buf.address(), size, arena.scope()).asByteBuffer(); - return fuseOperations.read(path.getUtf8String(0), buffer, size, offset, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + + var buffer = buf.reinterpret(size,arena,null).asByteBuffer(); + return fuseOperations.read(path.getUtf8String(0), buffer, size, offset, new FileInfoImpl(fi, arena)); } } private int readdir(MemorySegment path, MemorySegment buf, MemorySegment filler, long offset, MemorySegment fi, int flags) { - try (var arena = Arena.openConfined()) { - return fuseOperations.readdir(path.getUtf8String(0), new DirFillerImpl(buf, filler, arena), offset, new FileInfoImpl(fi, arena.scope()), flags); + try (var arena = Arena.ofConfined()) { + return fuseOperations.readdir(path.getUtf8String(0), new DirFillerImpl(buf, filler, arena), offset, new FileInfoImpl(fi, arena), flags); } } private int readlink(MemorySegment path, MemorySegment buf, long len) { - try (var arena = Arena.openConfined()) { - var buffer = MemorySegment.ofAddress(buf.address(), len, arena.scope()).asByteBuffer(); + try (var arena = Arena.ofConfined()) { + var buffer = buf.reinterpret(len,arena,null).asByteBuffer(); return fuseOperations.readlink(path.getUtf8String(0), buffer, len); } } private int release(MemorySegment path, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.release(path.getUtf8String(0), new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.release(path.getUtf8String(0), new FileInfoImpl(fi, arena)); } } private int releasedir(MemorySegment path, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.releasedir(path.getUtf8String(0), new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.releasedir(path.getUtf8String(0), new FileInfoImpl(fi, arena)); } } @@ -258,8 +260,8 @@ private int rmdir(MemorySegment path) { } private int statfs(MemorySegment path, MemorySegment statvfs) { - try (var arena = Arena.openConfined()) { - return fuseOperations.statfs(path.getUtf8String(0), new StatvfsImpl(statvfs, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.statfs(path.getUtf8String(0), new StatvfsImpl(statvfs, arena)); } } @@ -269,8 +271,8 @@ private int symlink(MemorySegment linkname, MemorySegment target) { @VisibleForTesting int truncate(MemorySegment path, long size, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - return fuseOperations.truncate(path.getUtf8String(0), size, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + return fuseOperations.truncate(path.getUtf8String(0), size, new FileInfoImpl(fi, arena)); } } @@ -280,21 +282,21 @@ private int unlink(MemorySegment path) { @VisibleForTesting int utimens(MemorySegment path, MemorySegment times, MemorySegment fi) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { // On Windows we know for sure that WinFSP will call this function only with // valid times: https://github.com/winfsp/winfsp/discussions/445 var seq = MemoryLayout.sequenceLayout(2, fuse_timespec.$LAYOUT()); - var segment = MemorySegment.ofAddress(times.address(), seq.byteSize(), arena.scope()); + var segment = times.reinterpret(seq.byteSize()); var time0 = segment.asSlice(0, fuse_timespec.$LAYOUT().byteSize()); var time1 = segment.asSlice(fuse_timespec.$LAYOUT().byteSize(), fuse_timespec.$LAYOUT().byteSize()); - return fuseOperations.utimens(path.getUtf8String(0), new TimeSpecImpl(time0), new TimeSpecImpl(time1), new FileInfoImpl(fi, arena.scope())); + return fuseOperations.utimens(path.getUtf8String(0), new TimeSpecImpl(time0), new TimeSpecImpl(time1), new FileInfoImpl(fi, arena)); } } private int write(MemorySegment path, MemorySegment buf, long size, long offset, MemorySegment fi) { - try (var arena = Arena.openConfined()) { - var buffer = MemorySegment.ofAddress(buf.address(), size, arena.scope()).asByteBuffer(); - return fuseOperations.write(path.getUtf8String(0), buffer, size, offset, new FileInfoImpl(fi, arena.scope())); + try (var arena = Arena.ofConfined()) { + var buffer = buf.reinterpret(size, arena,null).asByteBuffer(); + return fuseOperations.write(path.getUtf8String(0), buffer, size, offset, new FileInfoImpl(fi, arena)); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseMountImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseMountImpl.java index 565c6216..b5e33c13 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseMountImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/FuseMountImpl.java @@ -1,8 +1,8 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.FuseMount; -import org.cryptomator.jfuse.win.extr.fuse3_loop_config; -import org.cryptomator.jfuse.win.extr.fuse_h; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_loop_config; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_h; import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatImpl.java index 92c2bb48..d55b2a79 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatImpl.java @@ -2,14 +2,14 @@ import org.cryptomator.jfuse.api.Stat; import org.cryptomator.jfuse.api.TimeSpec; -import org.cryptomator.jfuse.win.extr.fuse_stat; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_stat; +import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; -import java.lang.foreign.SegmentScope; record StatImpl(MemorySegment segment) implements Stat { - public StatImpl(MemorySegment address, SegmentScope scope) { + public StatImpl(MemorySegment address, Arena scope) { this(fuse_stat.ofAddress(address, scope)); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatvfsImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatvfsImpl.java index d0e54f48..40c4d129 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatvfsImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/StatvfsImpl.java @@ -1,14 +1,14 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.Statvfs; -import org.cryptomator.jfuse.win.extr.fuse_statvfs; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_statvfs; +import java.lang.foreign.Arena; import java.lang.foreign.MemorySegment; -import java.lang.foreign.SegmentScope; record StatvfsImpl(MemorySegment segment) implements Statvfs { - public StatvfsImpl(MemorySegment address, SegmentScope scope) { + public StatvfsImpl(MemorySegment address, Arena scope) { this(fuse_statvfs.ofAddress(address, scope)); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/TimeSpecImpl.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/TimeSpecImpl.java index 99d16e57..be25a16a 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/TimeSpecImpl.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/TimeSpecImpl.java @@ -1,7 +1,7 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.TimeSpec; -import org.cryptomator.jfuse.win.extr.fuse_timespec; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_timespec; import java.lang.foreign.MemorySegment; import java.time.Instant; diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java index f9e026d4..b0ea5cf0 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/WinErrno.java @@ -1,7 +1,7 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.Errno; -import org.cryptomator.jfuse.win.extr.errno_h; +import org.cryptomator.jfuse.win.extr.errno.errno_h; record WinErrno() implements Errno { diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/Constants$root.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/Constants$root.java deleted file mode 100644 index 82933b6f..00000000 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/Constants$root.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by jextract - -package org.cryptomator.jfuse.win.extr; - -import java.lang.invoke.MethodHandle; -import java.lang.invoke.VarHandle; -import java.nio.ByteOrder; -import java.lang.foreign.*; -import static java.lang.foreign.ValueLayout.*; -final class Constants$root { - - // Suppresses default constructor, ensuring non-instantiability. - private Constants$root() {} - static final OfBoolean C_BOOL$LAYOUT = JAVA_BOOLEAN; - static final OfByte C_CHAR$LAYOUT = JAVA_BYTE; - static final OfShort C_SHORT$LAYOUT = JAVA_SHORT; - static final OfInt C_INT$LAYOUT = JAVA_INT; - static final OfInt C_LONG$LAYOUT = JAVA_INT; - static final OfLong C_LONG_LONG$LAYOUT = JAVA_LONG; - static final OfFloat C_FLOAT$LAYOUT = JAVA_FLOAT; - static final OfDouble C_DOUBLE$LAYOUT = JAVA_DOUBLE; - static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64).asUnbounded(); -} - - diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$0.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$0.java deleted file mode 100644 index 6d136369..00000000 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$0.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by jextract - -package org.cryptomator.jfuse.win.extr; - -import java.lang.invoke.MethodHandle; -import java.lang.invoke.VarHandle; -import java.nio.ByteOrder; -import java.lang.foreign.*; -import static java.lang.foreign.ValueLayout.*; -final class constants$0 { - - // Suppresses default constructor, ensuring non-instantiability. - private constants$0() {} - static final FunctionDescriptor fuse3_fill_dir_t$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle fuse3_fill_dir_t$MH = RuntimeHelper.downcallHandle( - constants$0.fuse3_fill_dir_t$FUNC - ); - static final FunctionDescriptor fuse3_lib_help$FUNC = FunctionDescriptor.ofVoid( - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_lib_help$MH = RuntimeHelper.downcallHandle( - "fuse3_lib_help", - constants$0.fuse3_lib_help$FUNC - ); - static final FunctionDescriptor fuse3_new$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_new$MH = RuntimeHelper.downcallHandle( - "fuse3_new", - constants$0.fuse3_new$FUNC - ); - static final FunctionDescriptor fuse3_destroy$FUNC = FunctionDescriptor.ofVoid( - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_destroy$MH = RuntimeHelper.downcallHandle( - "fuse3_destroy", - constants$0.fuse3_destroy$FUNC - ); - static final FunctionDescriptor fuse3_mount$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_mount$MH = RuntimeHelper.downcallHandle( - "fuse3_mount", - constants$0.fuse3_mount$FUNC - ); -} - - diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$1.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$1.java deleted file mode 100644 index 04ca74e9..00000000 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/constants$1.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by jextract - -package org.cryptomator.jfuse.win.extr; - -import java.lang.invoke.MethodHandle; -import java.lang.invoke.VarHandle; -import java.nio.ByteOrder; -import java.lang.foreign.*; -import static java.lang.foreign.ValueLayout.*; -final class constants$1 { - - // Suppresses default constructor, ensuring non-instantiability. - private constants$1() {} - static final FunctionDescriptor fuse3_unmount$FUNC = FunctionDescriptor.ofVoid( - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_unmount$MH = RuntimeHelper.downcallHandle( - "fuse3_unmount", - constants$1.fuse3_unmount$FUNC - ); - static final FunctionDescriptor fuse3_loop$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_loop$MH = RuntimeHelper.downcallHandle( - "fuse3_loop", - constants$1.fuse3_loop$FUNC - ); - static final FunctionDescriptor fuse3_loop_mt_31$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle fuse3_loop_mt_31$MH = RuntimeHelper.downcallHandle( - "fuse3_loop_mt_31", - constants$1.fuse3_loop_mt_31$FUNC - ); - static final FunctionDescriptor fuse3_exit$FUNC = FunctionDescriptor.ofVoid( - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_exit$MH = RuntimeHelper.downcallHandle( - "fuse3_exit", - constants$1.fuse3_exit$FUNC - ); - static final FunctionDescriptor fuse3_get_session$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fuse3_get_session$MH = RuntimeHelper.downcallHandle( - "fuse3_get_session", - constants$1.fuse3_get_session$FUNC - ); -} - - diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/RuntimeHelper.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/RuntimeHelper.java similarity index 88% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/RuntimeHelper.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/RuntimeHelper.java index 4519d7b5..0b673e7b 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/RuntimeHelper.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/RuntimeHelper.java @@ -1,4 +1,4 @@ -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.errno; // Generated by jextract import java.lang.foreign.Linker; @@ -7,7 +7,7 @@ import java.lang.foreign.SymbolLookup; import java.lang.foreign.MemoryLayout; import java.lang.foreign.MemorySegment; -import java.lang.foreign.SegmentScope; +import java.lang.foreign.Arena; import java.lang.foreign.SegmentAllocator; import java.lang.foreign.ValueLayout; import java.lang.invoke.MethodHandle; @@ -20,6 +20,9 @@ import java.util.Optional; import java.util.stream.Stream; +import java.lang.foreign.AddressLayout; +import java.lang.foreign.MemoryLayout; + import static java.lang.foreign.Linker.*; import static java.lang.foreign.ValueLayout.*; @@ -30,9 +33,10 @@ final class RuntimeHelper { private static final MethodHandles.Lookup MH_LOOKUP = MethodHandles.lookup(); private static final SymbolLookup SYMBOL_LOOKUP; private static final SegmentAllocator THROWING_ALLOCATOR = (x, y) -> { throw new AssertionError("should not reach here"); }; + static final AddressLayout POINTER = ValueLayout.ADDRESS.withTargetLayout(MemoryLayout.sequenceLayout(JAVA_BYTE)); final static SegmentAllocator CONSTANT_ALLOCATOR = - (size, align) -> MemorySegment.allocateNative(size, align, SegmentScope.auto()); + (size, align) -> Arena.ofAuto().allocate(size, align); static { @@ -51,7 +55,9 @@ static T requireNonNull(T obj, String symbolName) { } static MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) { - return SYMBOL_LOOKUP.find(name).map(symbol -> MemorySegment.ofAddress(symbol.address(), layout.byteSize(), symbol.scope())).orElse(null); + return SYMBOL_LOOKUP.find(name) + .map(s -> s.reinterpret(layout.byteSize())) + .orElse(null); } static MethodHandle downcallHandle(String name, FunctionDescriptor fdesc) { @@ -70,18 +76,25 @@ static MethodHandle downcallHandleVariadic(String name, FunctionDescriptor fdesc orElse(null); } - static MemorySegment upcallStub(Class fi, Z z, FunctionDescriptor fdesc, SegmentScope scope) { + static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { + try { + return MH_LOOKUP.findVirtual(fi, name, fdesc.toMethodType()); + } catch (Throwable ex) { + throw new AssertionError(ex); + } + } + + static MemorySegment upcallStub(MethodHandle fiHandle, Z z, FunctionDescriptor fdesc, Arena scope) { try { - MethodHandle handle = MH_LOOKUP.findVirtual(fi, "apply", fdesc.toMethodType()); - handle = handle.bindTo(z); - return LINKER.upcallStub(handle, fdesc, scope); + fiHandle = fiHandle.bindTo(z); + return LINKER.upcallStub(fiHandle, fdesc, scope); } catch (Throwable ex) { throw new AssertionError(ex); } } - static MemorySegment asArray(MemorySegment addr, MemoryLayout layout, int numElements, SegmentScope scope) { - return MemorySegment.ofAddress(addr.address(), numElements * layout.byteSize(), scope); + static MemorySegment asArray(MemorySegment addr, MemoryLayout layout, int numElements, Arena arena) { + return addr.reinterpret(numElements * layout.byteSize(), arena, null); } // Internals only below this point diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/constants$0.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/constants$0.java new file mode 100644 index 00000000..9abd23a4 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/constants$0.java @@ -0,0 +1,16 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.errno; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$0 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$0() {} +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno_h.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/errno_h.java similarity index 79% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno_h.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/errno_h.java index 672edb39..0e3aae2d 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno_h.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/errno/errno_h.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.errno; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -9,14 +9,14 @@ import static java.lang.foreign.ValueLayout.*; public class errno_h { - public static final OfByte C_CHAR = Constants$root.C_CHAR$LAYOUT; - public static final OfShort C_SHORT = Constants$root.C_SHORT$LAYOUT; - public static final OfInt C_INT = Constants$root.C_LONG$LAYOUT; - public static final OfInt C_LONG = Constants$root.C_LONG$LAYOUT; - public static final OfLong C_LONG_LONG = Constants$root.C_LONG_LONG$LAYOUT; - public static final OfFloat C_FLOAT = Constants$root.C_FLOAT$LAYOUT; - public static final OfDouble C_DOUBLE = Constants$root.C_DOUBLE$LAYOUT; - public static final OfAddress C_POINTER = Constants$root.C_POINTER$LAYOUT; + public static final OfByte C_CHAR = JAVA_BYTE; + public static final OfShort C_SHORT = JAVA_SHORT; + public static final OfInt C_INT = JAVA_INT; + public static final OfInt C_LONG = JAVA_INT; + public static final OfLong C_LONG_LONG = JAVA_LONG; + public static final OfFloat C_FLOAT = JAVA_FLOAT; + public static final OfDouble C_DOUBLE = JAVA_DOUBLE; + public static final AddressLayout C_POINTER = RuntimeHelper.POINTER; /** * {@snippet : * #define ENOENT 2 diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/RuntimeHelper.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/RuntimeHelper.java new file mode 100644 index 00000000..09f33097 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/RuntimeHelper.java @@ -0,0 +1,245 @@ +package org.cryptomator.jfuse.win.extr.fcntl; +// Generated by jextract + +import java.lang.foreign.Linker; +import java.lang.foreign.FunctionDescriptor; +import java.lang.foreign.GroupLayout; +import java.lang.foreign.SymbolLookup; +import java.lang.foreign.MemoryLayout; +import java.lang.foreign.MemorySegment; +import java.lang.foreign.Arena; +import java.lang.foreign.SegmentAllocator; +import java.lang.foreign.ValueLayout; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.io.File; +import java.nio.file.Path; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Stream; + +import java.lang.foreign.AddressLayout; +import java.lang.foreign.MemoryLayout; + +import static java.lang.foreign.Linker.*; +import static java.lang.foreign.ValueLayout.*; + +final class RuntimeHelper { + + private static final Linker LINKER = Linker.nativeLinker(); + private static final ClassLoader LOADER = RuntimeHelper.class.getClassLoader(); + private static final MethodHandles.Lookup MH_LOOKUP = MethodHandles.lookup(); + private static final SymbolLookup SYMBOL_LOOKUP; + private static final SegmentAllocator THROWING_ALLOCATOR = (x, y) -> { throw new AssertionError("should not reach here"); }; + static final AddressLayout POINTER = ValueLayout.ADDRESS.withTargetLayout(MemoryLayout.sequenceLayout(JAVA_BYTE)); + + final static SegmentAllocator CONSTANT_ALLOCATOR = + (size, align) -> Arena.ofAuto().allocate(size, align); + + static { + + SymbolLookup loaderLookup = SymbolLookup.loaderLookup(); + SYMBOL_LOOKUP = name -> loaderLookup.find(name).or(() -> LINKER.defaultLookup().find(name)); + } + + // Suppresses default constructor, ensuring non-instantiability. + private RuntimeHelper() {} + + static T requireNonNull(T obj, String symbolName) { + if (obj == null) { + throw new UnsatisfiedLinkError("unresolved symbol: " + symbolName); + } + return obj; + } + + static MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) { + return SYMBOL_LOOKUP.find(name) + .map(s -> s.reinterpret(layout.byteSize())) + .orElse(null); + } + + static MethodHandle downcallHandle(String name, FunctionDescriptor fdesc) { + return SYMBOL_LOOKUP.find(name). + map(addr -> LINKER.downcallHandle(addr, fdesc)). + orElse(null); + } + + static MethodHandle downcallHandle(FunctionDescriptor fdesc) { + return LINKER.downcallHandle(fdesc); + } + + static MethodHandle downcallHandleVariadic(String name, FunctionDescriptor fdesc) { + return SYMBOL_LOOKUP.find(name). + map(addr -> VarargsInvoker.make(addr, fdesc)). + orElse(null); + } + + static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { + try { + return MH_LOOKUP.findVirtual(fi, name, fdesc.toMethodType()); + } catch (Throwable ex) { + throw new AssertionError(ex); + } + } + + static MemorySegment upcallStub(MethodHandle fiHandle, Z z, FunctionDescriptor fdesc, Arena scope) { + try { + fiHandle = fiHandle.bindTo(z); + return LINKER.upcallStub(fiHandle, fdesc, scope); + } catch (Throwable ex) { + throw new AssertionError(ex); + } + } + + static MemorySegment asArray(MemorySegment addr, MemoryLayout layout, int numElements, Arena arena) { + return addr.reinterpret(numElements * layout.byteSize(), arena, null); + } + + // Internals only below this point + + private static final class VarargsInvoker { + private static final MethodHandle INVOKE_MH; + private final MemorySegment symbol; + private final FunctionDescriptor function; + + private VarargsInvoker(MemorySegment symbol, FunctionDescriptor function) { + this.symbol = symbol; + this.function = function; + } + + static { + try { + INVOKE_MH = MethodHandles.lookup().findVirtual(VarargsInvoker.class, "invoke", MethodType.methodType(Object.class, SegmentAllocator.class, Object[].class)); + } catch (ReflectiveOperationException e) { + throw new RuntimeException(e); + } + } + + static MethodHandle make(MemorySegment symbol, FunctionDescriptor function) { + VarargsInvoker invoker = new VarargsInvoker(symbol, function); + MethodHandle handle = INVOKE_MH.bindTo(invoker).asCollector(Object[].class, function.argumentLayouts().size() + 1); + MethodType mtype = MethodType.methodType(function.returnLayout().isPresent() ? carrier(function.returnLayout().get(), true) : void.class); + for (MemoryLayout layout : function.argumentLayouts()) { + mtype = mtype.appendParameterTypes(carrier(layout, false)); + } + mtype = mtype.appendParameterTypes(Object[].class); + boolean needsAllocator = function.returnLayout().isPresent() && + function.returnLayout().get() instanceof GroupLayout; + if (needsAllocator) { + mtype = mtype.insertParameterTypes(0, SegmentAllocator.class); + } else { + handle = MethodHandles.insertArguments(handle, 0, THROWING_ALLOCATOR); + } + return handle.asType(mtype); + } + + static Class carrier(MemoryLayout layout, boolean ret) { + if (layout instanceof ValueLayout valueLayout) { + return valueLayout.carrier(); + } else if (layout instanceof GroupLayout) { + return MemorySegment.class; + } else { + throw new AssertionError("Cannot get here!"); + } + } + + private Object invoke(SegmentAllocator allocator, Object[] args) throws Throwable { + // one trailing Object[] + int nNamedArgs = function.argumentLayouts().size(); + assert(args.length == nNamedArgs + 1); + // The last argument is the array of vararg collector + Object[] unnamedArgs = (Object[]) args[args.length - 1]; + + int argsCount = nNamedArgs + unnamedArgs.length; + Class[] argTypes = new Class[argsCount]; + MemoryLayout[] argLayouts = new MemoryLayout[nNamedArgs + unnamedArgs.length]; + + int pos = 0; + for (pos = 0; pos < nNamedArgs; pos++) { + argLayouts[pos] = function.argumentLayouts().get(pos); + } + + assert pos == nNamedArgs; + for (Object o: unnamedArgs) { + argLayouts[pos] = variadicLayout(normalize(o.getClass())); + pos++; + } + assert pos == argsCount; + + FunctionDescriptor f = (function.returnLayout().isEmpty()) ? + FunctionDescriptor.ofVoid(argLayouts) : + FunctionDescriptor.of(function.returnLayout().get(), argLayouts); + MethodHandle mh = LINKER.downcallHandle(symbol, f); + boolean needsAllocator = function.returnLayout().isPresent() && + function.returnLayout().get() instanceof GroupLayout; + if (needsAllocator) { + mh = mh.bindTo(allocator); + } + // flatten argument list so that it can be passed to an asSpreader MH + Object[] allArgs = new Object[nNamedArgs + unnamedArgs.length]; + System.arraycopy(args, 0, allArgs, 0, nNamedArgs); + System.arraycopy(unnamedArgs, 0, allArgs, nNamedArgs, unnamedArgs.length); + + return mh.asSpreader(Object[].class, argsCount).invoke(allArgs); + } + + private static Class unboxIfNeeded(Class clazz) { + if (clazz == Boolean.class) { + return boolean.class; + } else if (clazz == Void.class) { + return void.class; + } else if (clazz == Byte.class) { + return byte.class; + } else if (clazz == Character.class) { + return char.class; + } else if (clazz == Short.class) { + return short.class; + } else if (clazz == Integer.class) { + return int.class; + } else if (clazz == Long.class) { + return long.class; + } else if (clazz == Float.class) { + return float.class; + } else if (clazz == Double.class) { + return double.class; + } else { + return clazz; + } + } + + private Class promote(Class c) { + if (c == byte.class || c == char.class || c == short.class || c == int.class) { + return long.class; + } else if (c == float.class) { + return double.class; + } else { + return c; + } + } + + private Class normalize(Class c) { + c = unboxIfNeeded(c); + if (c.isPrimitive()) { + return promote(c); + } + if (c == MemorySegment.class) { + return MemorySegment.class; + } + throw new IllegalArgumentException("Invalid type for ABI: " + c.getTypeName()); + } + + private MemoryLayout variadicLayout(Class c) { + if (c == long.class) { + return JAVA_LONG; + } else if (c == double.class) { + return JAVA_DOUBLE; + } else if (c == MemorySegment.class) { + return ADDRESS; + } else { + throw new IllegalArgumentException("Unhandled variadic argument class: " + c); + } + } + } +} diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/constants$0.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/constants$0.java new file mode 100644 index 00000000..f3672ad9 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/constants$0.java @@ -0,0 +1,16 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fcntl; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$0 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$0() {} +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl_h.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/fcntl_h.java similarity index 65% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl_h.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/fcntl_h.java index d14ccfe7..e79fd070 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl_h.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fcntl/fcntl_h.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fcntl; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -9,14 +9,14 @@ import static java.lang.foreign.ValueLayout.*; public class fcntl_h { - public static final OfByte C_CHAR = Constants$root.C_CHAR$LAYOUT; - public static final OfShort C_SHORT = Constants$root.C_SHORT$LAYOUT; - public static final OfInt C_INT = Constants$root.C_LONG$LAYOUT; - public static final OfInt C_LONG = Constants$root.C_LONG$LAYOUT; - public static final OfLong C_LONG_LONG = Constants$root.C_LONG_LONG$LAYOUT; - public static final OfFloat C_FLOAT = Constants$root.C_FLOAT$LAYOUT; - public static final OfDouble C_DOUBLE = Constants$root.C_DOUBLE$LAYOUT; - public static final OfAddress C_POINTER = Constants$root.C_POINTER$LAYOUT; + public static final OfByte C_CHAR = JAVA_BYTE; + public static final OfShort C_SHORT = JAVA_SHORT; + public static final OfInt C_INT = JAVA_INT; + public static final OfInt C_LONG = JAVA_INT; + public static final OfLong C_LONG_LONG = JAVA_LONG; + public static final OfFloat C_FLOAT = JAVA_FLOAT; + public static final OfDouble C_DOUBLE = JAVA_DOUBLE; + public static final AddressLayout C_POINTER = RuntimeHelper.POINTER; /** * {@snippet : * #define O_RDONLY 0 diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/Constants$root.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/Constants$root.java deleted file mode 100644 index db18ff6f..00000000 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/Constants$root.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by jextract - -package org.cryptomator.jfuse.win.extr.fuse2; - -import java.lang.invoke.MethodHandle; -import java.lang.invoke.VarHandle; -import java.nio.ByteOrder; -import java.lang.foreign.*; -import static java.lang.foreign.ValueLayout.*; -final class Constants$root { - - // Suppresses default constructor, ensuring non-instantiability. - private Constants$root() {} - static final OfBoolean C_BOOL$LAYOUT = JAVA_BOOLEAN; - static final OfByte C_CHAR$LAYOUT = JAVA_BYTE; - static final OfShort C_SHORT$LAYOUT = JAVA_SHORT; - static final OfInt C_INT$LAYOUT = JAVA_INT; - static final OfInt C_LONG$LAYOUT = JAVA_INT; - static final OfLong C_LONG_LONG$LAYOUT = JAVA_LONG; - static final OfFloat C_FLOAT$LAYOUT = JAVA_FLOAT; - static final OfDouble C_DOUBLE$LAYOUT = JAVA_DOUBLE; - static final OfAddress C_POINTER$LAYOUT = ADDRESS.withBitAlignment(64).asUnbounded(); -} - - diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/RuntimeHelper.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/RuntimeHelper.java index 6d597184..5fa763ce 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/RuntimeHelper.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/RuntimeHelper.java @@ -7,7 +7,7 @@ import java.lang.foreign.SymbolLookup; import java.lang.foreign.MemoryLayout; import java.lang.foreign.MemorySegment; -import java.lang.foreign.SegmentScope; +import java.lang.foreign.Arena; import java.lang.foreign.SegmentAllocator; import java.lang.foreign.ValueLayout; import java.lang.invoke.MethodHandle; @@ -20,6 +20,9 @@ import java.util.Optional; import java.util.stream.Stream; +import java.lang.foreign.AddressLayout; +import java.lang.foreign.MemoryLayout; + import static java.lang.foreign.Linker.*; import static java.lang.foreign.ValueLayout.*; @@ -30,9 +33,10 @@ final class RuntimeHelper { private static final MethodHandles.Lookup MH_LOOKUP = MethodHandles.lookup(); private static final SymbolLookup SYMBOL_LOOKUP; private static final SegmentAllocator THROWING_ALLOCATOR = (x, y) -> { throw new AssertionError("should not reach here"); }; + static final AddressLayout POINTER = ValueLayout.ADDRESS.withTargetLayout(MemoryLayout.sequenceLayout(JAVA_BYTE)); final static SegmentAllocator CONSTANT_ALLOCATOR = - (size, align) -> MemorySegment.allocateNative(size, align, SegmentScope.auto()); + (size, align) -> Arena.ofAuto().allocate(size, align); static { @@ -51,7 +55,9 @@ static T requireNonNull(T obj, String symbolName) { } static MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) { - return SYMBOL_LOOKUP.find(name).map(symbol -> MemorySegment.ofAddress(symbol.address(), layout.byteSize(), symbol.scope())).orElse(null); + return SYMBOL_LOOKUP.find(name) + .map(s -> s.reinterpret(layout.byteSize())) + .orElse(null); } static MethodHandle downcallHandle(String name, FunctionDescriptor fdesc) { @@ -70,18 +76,25 @@ static MethodHandle downcallHandleVariadic(String name, FunctionDescriptor fdesc orElse(null); } - static MemorySegment upcallStub(Class fi, Z z, FunctionDescriptor fdesc, SegmentScope scope) { + static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { + try { + return MH_LOOKUP.findVirtual(fi, name, fdesc.toMethodType()); + } catch (Throwable ex) { + throw new AssertionError(ex); + } + } + + static MemorySegment upcallStub(MethodHandle fiHandle, Z z, FunctionDescriptor fdesc, Arena scope) { try { - MethodHandle handle = MH_LOOKUP.findVirtual(fi, "apply", fdesc.toMethodType()); - handle = handle.bindTo(z); - return LINKER.upcallStub(handle, fdesc, scope); + fiHandle = fiHandle.bindTo(z); + return LINKER.upcallStub(fiHandle, fdesc, scope); } catch (Throwable ex) { throw new AssertionError(ex); } } - static MemorySegment asArray(MemorySegment addr, MemoryLayout layout, int numElements, SegmentScope scope) { - return MemorySegment.ofAddress(addr.address(), numElements * layout.byteSize(), scope); + static MemorySegment asArray(MemorySegment addr, MemoryLayout layout, int numElements, Arena arena) { + return addr.reinterpret(numElements * layout.byteSize(), arena, null); } // Internals only below this point diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/constants$0.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/constants$0.java index 26ca7bdb..352eac80 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/constants$0.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/constants$0.java @@ -11,15 +11,25 @@ final class constants$0 { // Suppresses default constructor, ensuring non-instantiability. private constants$0() {} - static final FunctionDescriptor fuse_parse_cmdline$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT + static final StructLayout const$0 = MemoryLayout.structLayout( + JAVA_INT.withName("argc"), + MemoryLayout.paddingLayout(4), + RuntimeHelper.POINTER.withName("argv"), + JAVA_INT.withName("allocated"), + MemoryLayout.paddingLayout(4) + ).withName("fuse_args"); + static final VarHandle const$1 = constants$0.const$0.varHandle(MemoryLayout.PathElement.groupElement("argc")); + static final VarHandle const$2 = constants$0.const$0.varHandle(MemoryLayout.PathElement.groupElement("argv")); + static final VarHandle const$3 = constants$0.const$0.varHandle(MemoryLayout.PathElement.groupElement("allocated")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER ); - static final MethodHandle fuse_parse_cmdline$MH = RuntimeHelper.downcallHandle( + static final MethodHandle const$5 = RuntimeHelper.downcallHandle( "fuse_parse_cmdline", - constants$0.fuse_parse_cmdline$FUNC + constants$0.const$4 ); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse2_h.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse2_h.java index fdaa120d..ab3a8e8f 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse2_h.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse2_h.java @@ -9,16 +9,16 @@ import static java.lang.foreign.ValueLayout.*; public class fuse2_h { - public static final OfByte C_CHAR = Constants$root.C_CHAR$LAYOUT; - public static final OfShort C_SHORT = Constants$root.C_SHORT$LAYOUT; - public static final OfInt C_INT = Constants$root.C_LONG$LAYOUT; - public static final OfInt C_LONG = Constants$root.C_LONG$LAYOUT; - public static final OfLong C_LONG_LONG = Constants$root.C_LONG_LONG$LAYOUT; - public static final OfFloat C_FLOAT = Constants$root.C_FLOAT$LAYOUT; - public static final OfDouble C_DOUBLE = Constants$root.C_DOUBLE$LAYOUT; - public static final OfAddress C_POINTER = Constants$root.C_POINTER$LAYOUT; + public static final OfByte C_CHAR = JAVA_BYTE; + public static final OfShort C_SHORT = JAVA_SHORT; + public static final OfInt C_INT = JAVA_INT; + public static final OfInt C_LONG = JAVA_INT; + public static final OfLong C_LONG_LONG = JAVA_LONG; + public static final OfFloat C_FLOAT = JAVA_FLOAT; + public static final OfDouble C_DOUBLE = JAVA_DOUBLE; + public static final AddressLayout C_POINTER = RuntimeHelper.POINTER; public static MethodHandle fuse_parse_cmdline$MH() { - return RuntimeHelper.requireNonNull(constants$0.fuse_parse_cmdline$MH,"fuse_parse_cmdline"); + return RuntimeHelper.requireNonNull(constants$0.const$5,"fuse_parse_cmdline"); } /** * {@snippet : diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse_args.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse_args.java index d4cd621a..32e2821d 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse_args.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse2/fuse_args.java @@ -18,19 +18,11 @@ */ public class fuse_args { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG$LAYOUT.withName("argc"), - MemoryLayout.paddingLayout(32), - Constants$root.C_POINTER$LAYOUT.withName("argv"), - Constants$root.C_LONG$LAYOUT.withName("allocated"), - MemoryLayout.paddingLayout(32) - ).withName("fuse_args"); public static MemoryLayout $LAYOUT() { - return fuse_args.$struct$LAYOUT; + return constants$0.const$0; } - static final VarHandle argc$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("argc")); public static VarHandle argc$VH() { - return fuse_args.argc$VH; + return constants$0.const$1; } /** * Getter for field: @@ -39,7 +31,7 @@ public class fuse_args { * } */ public static int argc$get(MemorySegment seg) { - return (int)fuse_args.argc$VH.get(seg); + return (int)constants$0.const$1.get(seg); } /** * Setter for field: @@ -48,17 +40,16 @@ public class fuse_args { * } */ public static void argc$set(MemorySegment seg, int x) { - fuse_args.argc$VH.set(seg, x); + constants$0.const$1.set(seg, x); } public static int argc$get(MemorySegment seg, long index) { - return (int)fuse_args.argc$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$0.const$1.get(seg.asSlice(index*sizeof())); } public static void argc$set(MemorySegment seg, long index, int x) { - fuse_args.argc$VH.set(seg.asSlice(index*sizeof()), x); + constants$0.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle argv$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("argv")); public static VarHandle argv$VH() { - return fuse_args.argv$VH; + return constants$0.const$2; } /** * Getter for field: @@ -67,7 +58,7 @@ public class fuse_args { * } */ public static MemorySegment argv$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse_args.argv$VH.get(seg); + return (java.lang.foreign.MemorySegment)constants$0.const$2.get(seg); } /** * Setter for field: @@ -76,17 +67,16 @@ public class fuse_args { * } */ public static void argv$set(MemorySegment seg, MemorySegment x) { - fuse_args.argv$VH.set(seg, x); + constants$0.const$2.set(seg, x); } public static MemorySegment argv$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse_args.argv$VH.get(seg.asSlice(index*sizeof())); + return (java.lang.foreign.MemorySegment)constants$0.const$2.get(seg.asSlice(index*sizeof())); } public static void argv$set(MemorySegment seg, long index, MemorySegment x) { - fuse_args.argv$VH.set(seg.asSlice(index*sizeof()), x); + constants$0.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle allocated$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("allocated")); public static VarHandle allocated$VH() { - return fuse_args.allocated$VH; + return constants$0.const$3; } /** * Getter for field: @@ -95,7 +85,7 @@ public class fuse_args { * } */ public static int allocated$get(MemorySegment seg) { - return (int)fuse_args.allocated$VH.get(seg); + return (int)constants$0.const$3.get(seg); } /** * Setter for field: @@ -104,20 +94,20 @@ public class fuse_args { * } */ public static void allocated$set(MemorySegment seg, int x) { - fuse_args.allocated$VH.set(seg, x); + constants$0.const$3.set(seg, x); } public static int allocated$get(MemorySegment seg, long index) { - return (int)fuse_args.allocated$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$0.const$3.get(seg.asSlice(index*sizeof())); } public static void allocated$set(MemorySegment seg, long index, int x) { - fuse_args.allocated$VH.set(seg.asSlice(index*sizeof()), x); + constants$0.const$3.set(seg.asSlice(index*sizeof()), x); } public static long sizeof() { return $LAYOUT().byteSize(); } public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/RuntimeHelper.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/RuntimeHelper.java new file mode 100644 index 00000000..6fce6ccb --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/RuntimeHelper.java @@ -0,0 +1,245 @@ +package org.cryptomator.jfuse.win.extr.fuse3; +// Generated by jextract + +import java.lang.foreign.Linker; +import java.lang.foreign.FunctionDescriptor; +import java.lang.foreign.GroupLayout; +import java.lang.foreign.SymbolLookup; +import java.lang.foreign.MemoryLayout; +import java.lang.foreign.MemorySegment; +import java.lang.foreign.Arena; +import java.lang.foreign.SegmentAllocator; +import java.lang.foreign.ValueLayout; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.io.File; +import java.nio.file.Path; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Stream; + +import java.lang.foreign.AddressLayout; +import java.lang.foreign.MemoryLayout; + +import static java.lang.foreign.Linker.*; +import static java.lang.foreign.ValueLayout.*; + +final class RuntimeHelper { + + private static final Linker LINKER = Linker.nativeLinker(); + private static final ClassLoader LOADER = RuntimeHelper.class.getClassLoader(); + private static final MethodHandles.Lookup MH_LOOKUP = MethodHandles.lookup(); + private static final SymbolLookup SYMBOL_LOOKUP; + private static final SegmentAllocator THROWING_ALLOCATOR = (x, y) -> { throw new AssertionError("should not reach here"); }; + static final AddressLayout POINTER = ValueLayout.ADDRESS.withTargetLayout(MemoryLayout.sequenceLayout(JAVA_BYTE)); + + final static SegmentAllocator CONSTANT_ALLOCATOR = + (size, align) -> Arena.ofAuto().allocate(size, align); + + static { + + SymbolLookup loaderLookup = SymbolLookup.loaderLookup(); + SYMBOL_LOOKUP = name -> loaderLookup.find(name).or(() -> LINKER.defaultLookup().find(name)); + } + + // Suppresses default constructor, ensuring non-instantiability. + private RuntimeHelper() {} + + static T requireNonNull(T obj, String symbolName) { + if (obj == null) { + throw new UnsatisfiedLinkError("unresolved symbol: " + symbolName); + } + return obj; + } + + static MemorySegment lookupGlobalVariable(String name, MemoryLayout layout) { + return SYMBOL_LOOKUP.find(name) + .map(s -> s.reinterpret(layout.byteSize())) + .orElse(null); + } + + static MethodHandle downcallHandle(String name, FunctionDescriptor fdesc) { + return SYMBOL_LOOKUP.find(name). + map(addr -> LINKER.downcallHandle(addr, fdesc)). + orElse(null); + } + + static MethodHandle downcallHandle(FunctionDescriptor fdesc) { + return LINKER.downcallHandle(fdesc); + } + + static MethodHandle downcallHandleVariadic(String name, FunctionDescriptor fdesc) { + return SYMBOL_LOOKUP.find(name). + map(addr -> VarargsInvoker.make(addr, fdesc)). + orElse(null); + } + + static MethodHandle upcallHandle(Class fi, String name, FunctionDescriptor fdesc) { + try { + return MH_LOOKUP.findVirtual(fi, name, fdesc.toMethodType()); + } catch (Throwable ex) { + throw new AssertionError(ex); + } + } + + static MemorySegment upcallStub(MethodHandle fiHandle, Z z, FunctionDescriptor fdesc, Arena scope) { + try { + fiHandle = fiHandle.bindTo(z); + return LINKER.upcallStub(fiHandle, fdesc, scope); + } catch (Throwable ex) { + throw new AssertionError(ex); + } + } + + static MemorySegment asArray(MemorySegment addr, MemoryLayout layout, int numElements, Arena arena) { + return addr.reinterpret(numElements * layout.byteSize(), arena, null); + } + + // Internals only below this point + + private static final class VarargsInvoker { + private static final MethodHandle INVOKE_MH; + private final MemorySegment symbol; + private final FunctionDescriptor function; + + private VarargsInvoker(MemorySegment symbol, FunctionDescriptor function) { + this.symbol = symbol; + this.function = function; + } + + static { + try { + INVOKE_MH = MethodHandles.lookup().findVirtual(VarargsInvoker.class, "invoke", MethodType.methodType(Object.class, SegmentAllocator.class, Object[].class)); + } catch (ReflectiveOperationException e) { + throw new RuntimeException(e); + } + } + + static MethodHandle make(MemorySegment symbol, FunctionDescriptor function) { + VarargsInvoker invoker = new VarargsInvoker(symbol, function); + MethodHandle handle = INVOKE_MH.bindTo(invoker).asCollector(Object[].class, function.argumentLayouts().size() + 1); + MethodType mtype = MethodType.methodType(function.returnLayout().isPresent() ? carrier(function.returnLayout().get(), true) : void.class); + for (MemoryLayout layout : function.argumentLayouts()) { + mtype = mtype.appendParameterTypes(carrier(layout, false)); + } + mtype = mtype.appendParameterTypes(Object[].class); + boolean needsAllocator = function.returnLayout().isPresent() && + function.returnLayout().get() instanceof GroupLayout; + if (needsAllocator) { + mtype = mtype.insertParameterTypes(0, SegmentAllocator.class); + } else { + handle = MethodHandles.insertArguments(handle, 0, THROWING_ALLOCATOR); + } + return handle.asType(mtype); + } + + static Class carrier(MemoryLayout layout, boolean ret) { + if (layout instanceof ValueLayout valueLayout) { + return valueLayout.carrier(); + } else if (layout instanceof GroupLayout) { + return MemorySegment.class; + } else { + throw new AssertionError("Cannot get here!"); + } + } + + private Object invoke(SegmentAllocator allocator, Object[] args) throws Throwable { + // one trailing Object[] + int nNamedArgs = function.argumentLayouts().size(); + assert(args.length == nNamedArgs + 1); + // The last argument is the array of vararg collector + Object[] unnamedArgs = (Object[]) args[args.length - 1]; + + int argsCount = nNamedArgs + unnamedArgs.length; + Class[] argTypes = new Class[argsCount]; + MemoryLayout[] argLayouts = new MemoryLayout[nNamedArgs + unnamedArgs.length]; + + int pos = 0; + for (pos = 0; pos < nNamedArgs; pos++) { + argLayouts[pos] = function.argumentLayouts().get(pos); + } + + assert pos == nNamedArgs; + for (Object o: unnamedArgs) { + argLayouts[pos] = variadicLayout(normalize(o.getClass())); + pos++; + } + assert pos == argsCount; + + FunctionDescriptor f = (function.returnLayout().isEmpty()) ? + FunctionDescriptor.ofVoid(argLayouts) : + FunctionDescriptor.of(function.returnLayout().get(), argLayouts); + MethodHandle mh = LINKER.downcallHandle(symbol, f); + boolean needsAllocator = function.returnLayout().isPresent() && + function.returnLayout().get() instanceof GroupLayout; + if (needsAllocator) { + mh = mh.bindTo(allocator); + } + // flatten argument list so that it can be passed to an asSpreader MH + Object[] allArgs = new Object[nNamedArgs + unnamedArgs.length]; + System.arraycopy(args, 0, allArgs, 0, nNamedArgs); + System.arraycopy(unnamedArgs, 0, allArgs, nNamedArgs, unnamedArgs.length); + + return mh.asSpreader(Object[].class, argsCount).invoke(allArgs); + } + + private static Class unboxIfNeeded(Class clazz) { + if (clazz == Boolean.class) { + return boolean.class; + } else if (clazz == Void.class) { + return void.class; + } else if (clazz == Byte.class) { + return byte.class; + } else if (clazz == Character.class) { + return char.class; + } else if (clazz == Short.class) { + return short.class; + } else if (clazz == Integer.class) { + return int.class; + } else if (clazz == Long.class) { + return long.class; + } else if (clazz == Float.class) { + return float.class; + } else if (clazz == Double.class) { + return double.class; + } else { + return clazz; + } + } + + private Class promote(Class c) { + if (c == byte.class || c == char.class || c == short.class || c == int.class) { + return long.class; + } else if (c == float.class) { + return double.class; + } else { + return c; + } + } + + private Class normalize(Class c) { + c = unboxIfNeeded(c); + if (c.isPrimitive()) { + return promote(c); + } + if (c == MemorySegment.class) { + return MemorySegment.class; + } + throw new IllegalArgumentException("Invalid type for ABI: " + c.getTypeName()); + } + + private MemoryLayout variadicLayout(Class c) { + if (c == long.class) { + return JAVA_LONG; + } else if (c == double.class) { + return JAVA_DOUBLE; + } else if (c == MemorySegment.class) { + return ADDRESS; + } else { + throw new IllegalArgumentException("Unhandled variadic argument class: " + c); + } + } + } +} diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$0.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$0.java new file mode 100644 index 00000000..c917deb1 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$0.java @@ -0,0 +1,56 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$0 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$0() {} + static final StructLayout const$0 = MemoryLayout.structLayout( + JAVA_LONG.withName("tv_sec"), + JAVA_LONG.withName("tv_nsec") + ).withName("fuse_timespec"); + static final VarHandle const$1 = constants$0.const$0.varHandle(MemoryLayout.PathElement.groupElement("tv_sec")); + static final VarHandle const$2 = constants$0.const$0.varHandle(MemoryLayout.PathElement.groupElement("tv_nsec")); + static final StructLayout const$3 = MemoryLayout.structLayout( + JAVA_INT.withName("st_dev"), + MemoryLayout.paddingLayout(4), + JAVA_LONG.withName("st_ino"), + JAVA_INT.withName("st_mode"), + JAVA_SHORT.withName("st_nlink"), + MemoryLayout.paddingLayout(2), + JAVA_INT.withName("st_uid"), + JAVA_INT.withName("st_gid"), + JAVA_INT.withName("st_rdev"), + MemoryLayout.paddingLayout(4), + JAVA_LONG.withName("st_size"), + MemoryLayout.structLayout( + JAVA_LONG.withName("tv_sec"), + JAVA_LONG.withName("tv_nsec") + ).withName("st_atim"), + MemoryLayout.structLayout( + JAVA_LONG.withName("tv_sec"), + JAVA_LONG.withName("tv_nsec") + ).withName("st_mtim"), + MemoryLayout.structLayout( + JAVA_LONG.withName("tv_sec"), + JAVA_LONG.withName("tv_nsec") + ).withName("st_ctim"), + JAVA_INT.withName("st_blksize"), + MemoryLayout.paddingLayout(4), + JAVA_LONG.withName("st_blocks"), + MemoryLayout.structLayout( + JAVA_LONG.withName("tv_sec"), + JAVA_LONG.withName("tv_nsec") + ).withName("st_birthtim") + ).withName("fuse_stat"); + static final VarHandle const$4 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_dev")); + static final VarHandle const$5 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_ino")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$1.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$1.java new file mode 100644 index 00000000..59f2ac2a --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$1.java @@ -0,0 +1,22 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$1 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$1() {} + static final VarHandle const$0 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_mode")); + static final VarHandle const$1 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_nlink")); + static final VarHandle const$2 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_uid")); + static final VarHandle const$3 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_gid")); + static final VarHandle const$4 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_rdev")); + static final VarHandle const$5 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_size")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$10.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$10.java new file mode 100644 index 00000000..7012b3c4 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$10.java @@ -0,0 +1,22 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$10 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$10() {} + static final VarHandle const$0 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("remember")); + static final VarHandle const$1 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("hard_remove")); + static final VarHandle const$2 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("use_ino")); + static final VarHandle const$3 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("readdir_ino")); + static final VarHandle const$4 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("direct_io")); + static final VarHandle const$5 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("kernel_cache")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$11.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$11.java new file mode 100644 index 00000000..9019b7df --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$11.java @@ -0,0 +1,22 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$11 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$11() {} + static final VarHandle const$0 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("auto_cache")); + static final VarHandle const$1 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("ac_attr_timeout_set")); + static final VarHandle const$2 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("ac_attr_timeout")); + static final VarHandle const$3 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("nullpath_ok")); + static final VarHandle const$4 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("show_help")); + static final VarHandle const$5 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("modules")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$12.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$12.java new file mode 100644 index 00000000..3ccf0b5a --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$12.java @@ -0,0 +1,69 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$12 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$12() {} + static final VarHandle const$0 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("debug")); + static final StructLayout const$1 = MemoryLayout.structLayout( + RuntimeHelper.POINTER.withName("getattr"), + RuntimeHelper.POINTER.withName("readlink"), + RuntimeHelper.POINTER.withName("mknod"), + RuntimeHelper.POINTER.withName("mkdir"), + RuntimeHelper.POINTER.withName("unlink"), + RuntimeHelper.POINTER.withName("rmdir"), + RuntimeHelper.POINTER.withName("symlink"), + RuntimeHelper.POINTER.withName("rename"), + RuntimeHelper.POINTER.withName("link"), + RuntimeHelper.POINTER.withName("chmod"), + RuntimeHelper.POINTER.withName("chown"), + RuntimeHelper.POINTER.withName("truncate"), + RuntimeHelper.POINTER.withName("open"), + RuntimeHelper.POINTER.withName("read"), + RuntimeHelper.POINTER.withName("write"), + RuntimeHelper.POINTER.withName("statfs"), + RuntimeHelper.POINTER.withName("flush"), + RuntimeHelper.POINTER.withName("release"), + RuntimeHelper.POINTER.withName("fsync"), + RuntimeHelper.POINTER.withName("setxattr"), + RuntimeHelper.POINTER.withName("getxattr"), + RuntimeHelper.POINTER.withName("listxattr"), + RuntimeHelper.POINTER.withName("removexattr"), + RuntimeHelper.POINTER.withName("opendir"), + RuntimeHelper.POINTER.withName("readdir"), + RuntimeHelper.POINTER.withName("releasedir"), + RuntimeHelper.POINTER.withName("fsyncdir"), + RuntimeHelper.POINTER.withName("init"), + RuntimeHelper.POINTER.withName("destroy"), + RuntimeHelper.POINTER.withName("access"), + RuntimeHelper.POINTER.withName("create"), + RuntimeHelper.POINTER.withName("lock"), + RuntimeHelper.POINTER.withName("utimens"), + RuntimeHelper.POINTER.withName("bmap"), + RuntimeHelper.POINTER.withName("ioctl"), + RuntimeHelper.POINTER.withName("poll"), + RuntimeHelper.POINTER.withName("write_buf"), + RuntimeHelper.POINTER.withName("read_buf"), + RuntimeHelper.POINTER.withName("flock"), + RuntimeHelper.POINTER.withName("fallocate") + ).withName("fuse3_operations"); + static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER + ); + static final MethodHandle const$3 = RuntimeHelper.upcallHandle(fuse3_operations.getattr.class, "apply", constants$12.const$2); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + constants$12.const$2 + ); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("getattr")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$13.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$13.java new file mode 100644 index 00000000..f4eac9b9 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$13.java @@ -0,0 +1,32 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$13 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$13() {} + static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_LONG + ); + static final MethodHandle const$1 = RuntimeHelper.upcallHandle(fuse3_operations.readlink.class, "apply", constants$13.const$0); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + constants$13.const$0 + ); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("readlink")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + JAVA_INT, + JAVA_INT + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.mknod.class, "apply", constants$13.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$14.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$14.java new file mode 100644 index 00000000..631a1716 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$14.java @@ -0,0 +1,29 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$14 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$14() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$13.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("mknod")); + static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + JAVA_INT + ); + static final MethodHandle const$3 = RuntimeHelper.upcallHandle(fuse3_operations.mkdir.class, "apply", constants$14.const$2); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + constants$14.const$2 + ); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("mkdir")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$15.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$15.java new file mode 100644 index 00000000..edca9f35 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$15.java @@ -0,0 +1,26 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$15 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$15() {} + static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER + ); + static final MethodHandle const$1 = RuntimeHelper.upcallHandle(fuse3_operations.unlink.class, "apply", constants$15.const$0); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + constants$15.const$0 + ); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("unlink")); + static final MethodHandle const$4 = RuntimeHelper.upcallHandle(fuse3_operations.rmdir.class, "apply", constants$15.const$0); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("rmdir")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$16.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$16.java new file mode 100644 index 00000000..ae57ed39 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$16.java @@ -0,0 +1,31 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$16 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$16() {} + static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER + ); + static final MethodHandle const$1 = RuntimeHelper.upcallHandle(fuse3_operations.symlink.class, "apply", constants$16.const$0); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + constants$16.const$0 + ); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("symlink")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_INT + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.rename.class, "apply", constants$16.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$17.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$17.java new file mode 100644 index 00000000..fd5a5f73 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$17.java @@ -0,0 +1,28 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$17 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$17() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$16.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("rename")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.link.class, "apply", constants$16.const$0); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("link")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + JAVA_INT, + RuntimeHelper.POINTER + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.chmod.class, "apply", constants$17.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$18.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$18.java new file mode 100644 index 00000000..adf93c44 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$18.java @@ -0,0 +1,31 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$18 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$18() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$17.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("chmod")); + static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + JAVA_INT, + JAVA_INT, + RuntimeHelper.POINTER + ); + static final MethodHandle const$3 = RuntimeHelper.upcallHandle(fuse3_operations.chown.class, "apply", constants$18.const$2); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + constants$18.const$2 + ); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("chown")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$19.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$19.java new file mode 100644 index 00000000..9b083c2e --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$19.java @@ -0,0 +1,28 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$19 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$19() {} + static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + JAVA_LONG, + RuntimeHelper.POINTER + ); + static final MethodHandle const$1 = RuntimeHelper.upcallHandle(fuse3_operations.truncate.class, "apply", constants$19.const$0); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + constants$19.const$0 + ); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("truncate")); + static final MethodHandle const$4 = RuntimeHelper.upcallHandle(fuse3_operations.open.class, "apply", constants$16.const$0); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("open")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$2.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$2.java new file mode 100644 index 00000000..6198d365 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$2.java @@ -0,0 +1,34 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$2 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$2() {} + static final VarHandle const$0 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_blksize")); + static final VarHandle const$1 = constants$0.const$3.varHandle(MemoryLayout.PathElement.groupElement("st_blocks")); + static final StructLayout const$2 = MemoryLayout.structLayout( + JAVA_LONG.withName("f_bsize"), + JAVA_LONG.withName("f_frsize"), + JAVA_LONG.withName("f_blocks"), + JAVA_LONG.withName("f_bfree"), + JAVA_LONG.withName("f_bavail"), + JAVA_LONG.withName("f_files"), + JAVA_LONG.withName("f_ffree"), + JAVA_LONG.withName("f_favail"), + JAVA_LONG.withName("f_fsid"), + JAVA_LONG.withName("f_flag"), + JAVA_LONG.withName("f_namemax") + ).withName("fuse_statvfs"); + static final VarHandle const$3 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_bsize")); + static final VarHandle const$4 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_frsize")); + static final VarHandle const$5 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_blocks")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$20.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$20.java new file mode 100644 index 00000000..38cc1a2b --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$20.java @@ -0,0 +1,30 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$20 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$20() {} + static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_LONG, + JAVA_LONG, + RuntimeHelper.POINTER + ); + static final MethodHandle const$1 = RuntimeHelper.upcallHandle(fuse3_operations.read.class, "apply", constants$20.const$0); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + constants$20.const$0 + ); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("read")); + static final MethodHandle const$4 = RuntimeHelper.upcallHandle(fuse3_operations.write.class, "apply", constants$20.const$0); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("write")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$21.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$21.java new file mode 100644 index 00000000..e68ba792 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$21.java @@ -0,0 +1,22 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$21 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$21() {} + static final MethodHandle const$0 = RuntimeHelper.upcallHandle(fuse3_operations.statfs.class, "apply", constants$16.const$0); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("statfs")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.flush.class, "apply", constants$16.const$0); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("flush")); + static final MethodHandle const$4 = RuntimeHelper.upcallHandle(fuse3_operations.release.class, "apply", constants$16.const$0); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("release")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$22.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$22.java new file mode 100644 index 00000000..7908c0ee --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$22.java @@ -0,0 +1,27 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$22 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$22() {} + static final MethodHandle const$0 = RuntimeHelper.upcallHandle(fuse3_operations.fsync.class, "apply", constants$17.const$4); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("fsync")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.setxattr.class, "apply", constants$7.const$3); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("setxattr")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_LONG + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.getxattr.class, "apply", constants$22.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$23.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$23.java new file mode 100644 index 00000000..f9966217 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$23.java @@ -0,0 +1,24 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$23 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$23() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$22.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("getxattr")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.listxattr.class, "apply", constants$13.const$0); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("listxattr")); + static final MethodHandle const$4 = RuntimeHelper.upcallHandle(fuse3_operations.removexattr.class, "apply", constants$16.const$0); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("removexattr")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$24.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$24.java new file mode 100644 index 00000000..b08fa797 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$24.java @@ -0,0 +1,31 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$24 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$24() {} + static final MethodHandle const$0 = RuntimeHelper.upcallHandle(fuse3_operations.opendir.class, "apply", constants$16.const$0); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("opendir")); + static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_LONG, + RuntimeHelper.POINTER, + JAVA_INT + ); + static final MethodHandle const$3 = RuntimeHelper.upcallHandle(fuse3_operations.readdir.class, "apply", constants$24.const$2); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + constants$24.const$2 + ); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("readdir")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$25.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$25.java new file mode 100644 index 00000000..0da655e0 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$25.java @@ -0,0 +1,25 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$25 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$25() {} + static final MethodHandle const$0 = RuntimeHelper.upcallHandle(fuse3_operations.releasedir.class, "apply", constants$16.const$0); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("releasedir")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.fsyncdir.class, "apply", constants$17.const$4); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("fsyncdir")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.init.class, "apply", constants$25.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$26.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$26.java new file mode 100644 index 00000000..720b873c --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$26.java @@ -0,0 +1,28 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$26 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$26() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$25.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("init")); + static final FunctionDescriptor const$2 = FunctionDescriptor.ofVoid( + RuntimeHelper.POINTER + ); + static final MethodHandle const$3 = RuntimeHelper.upcallHandle(fuse3_operations.destroy.class, "apply", constants$26.const$2); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + constants$26.const$2 + ); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("destroy")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$27.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$27.java new file mode 100644 index 00000000..96e79866 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$27.java @@ -0,0 +1,27 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$27 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$27() {} + static final MethodHandle const$0 = RuntimeHelper.upcallHandle(fuse3_operations.access.class, "apply", constants$14.const$2); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("access")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.create.class, "apply", constants$17.const$4); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("create")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_INT, + RuntimeHelper.POINTER + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.lock.class, "apply", constants$27.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$28.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$28.java new file mode 100644 index 00000000..da652dd3 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$28.java @@ -0,0 +1,24 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$28 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$28() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$27.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("lock")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.utimens.class, "apply", constants$12.const$2); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("utimens")); + static final MethodHandle const$4 = RuntimeHelper.upcallHandle(fuse3_operations.bmap.class, "apply", constants$19.const$0); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("bmap")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$29.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$29.java new file mode 100644 index 00000000..c7b84668 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$29.java @@ -0,0 +1,36 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$29 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$29() {} + static final FunctionDescriptor const$0 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_INT, + RuntimeHelper.POINTER + ); + static final MethodHandle const$1 = RuntimeHelper.upcallHandle(fuse3_operations.ioctl.class, "apply", constants$29.const$0); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + constants$29.const$0 + ); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("ioctl")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.poll.class, "apply", constants$29.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$3.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$3.java new file mode 100644 index 00000000..d20a40fc --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$3.java @@ -0,0 +1,22 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$3 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$3() {} + static final VarHandle const$0 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_bfree")); + static final VarHandle const$1 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_bavail")); + static final VarHandle const$2 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_files")); + static final VarHandle const$3 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_ffree")); + static final VarHandle const$4 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_favail")); + static final VarHandle const$5 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_fsid")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$30.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$30.java new file mode 100644 index 00000000..eb44b840 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$30.java @@ -0,0 +1,31 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$30 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$30() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$29.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("poll")); + static final FunctionDescriptor const$2 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_LONG, + RuntimeHelper.POINTER + ); + static final MethodHandle const$3 = RuntimeHelper.upcallHandle(fuse3_operations.write_buf.class, "apply", constants$30.const$2); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + constants$30.const$2 + ); + static final VarHandle const$5 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("write_buf")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$31.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$31.java new file mode 100644 index 00000000..8567f36b --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$31.java @@ -0,0 +1,28 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$31 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$31() {} + static final MethodHandle const$0 = RuntimeHelper.upcallHandle(fuse3_operations.read_buf.class, "apply", constants$20.const$0); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("read_buf")); + static final MethodHandle const$2 = RuntimeHelper.upcallHandle(fuse3_operations.flock.class, "apply", constants$16.const$4); + static final VarHandle const$3 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("flock")); + static final FunctionDescriptor const$4 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + JAVA_INT, + JAVA_LONG, + JAVA_LONG, + RuntimeHelper.POINTER + ); + static final MethodHandle const$5 = RuntimeHelper.upcallHandle(fuse3_operations.fallocate.class, "apply", constants$31.const$4); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$32.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$32.java new file mode 100644 index 00000000..42ad78ee --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$32.java @@ -0,0 +1,38 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$32 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$32() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + constants$31.const$4 + ); + static final VarHandle const$1 = constants$12.const$1.varHandle(MemoryLayout.PathElement.groupElement("fallocate")); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + "fuse3_lib_help", + constants$26.const$2 + ); + static final FunctionDescriptor const$3 = FunctionDescriptor.of(RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_LONG, + RuntimeHelper.POINTER + ); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + "fuse3_new", + constants$32.const$3 + ); + static final MethodHandle const$5 = RuntimeHelper.downcallHandle( + "fuse3_destroy", + constants$26.const$2 + ); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$33.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$33.java new file mode 100644 index 00000000..a70732d8 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$33.java @@ -0,0 +1,43 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$33 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$33() {} + static final MethodHandle const$0 = RuntimeHelper.downcallHandle( + "fuse3_mount", + constants$16.const$0 + ); + static final MethodHandle const$1 = RuntimeHelper.downcallHandle( + "fuse3_unmount", + constants$26.const$2 + ); + static final MethodHandle const$2 = RuntimeHelper.downcallHandle( + "fuse3_loop", + constants$15.const$0 + ); + static final MethodHandle const$3 = RuntimeHelper.downcallHandle( + "fuse3_loop_mt_31", + constants$14.const$2 + ); + static final MethodHandle const$4 = RuntimeHelper.downcallHandle( + "fuse3_exit", + constants$26.const$2 + ); + static final FunctionDescriptor const$5 = FunctionDescriptor.of(RuntimeHelper.POINTER, + RuntimeHelper.POINTER + ); + static final MethodHandle const$6 = RuntimeHelper.downcallHandle( + "fuse3_get_session", + constants$33.const$5 + ); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$4.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$4.java new file mode 100644 index 00000000..9d07837d --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$4.java @@ -0,0 +1,29 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$4 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$4() {} + static final VarHandle const$0 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_flag")); + static final VarHandle const$1 = constants$2.const$2.varHandle(MemoryLayout.PathElement.groupElement("f_namemax")); + static final StructLayout const$2 = MemoryLayout.structLayout( + JAVA_INT.withName("flags"), + MemoryLayout.paddingLayout(12), + JAVA_LONG.withName("fh"), + JAVA_LONG.withName("lock_owner"), + JAVA_INT.withName("poll_events"), + MemoryLayout.paddingLayout(4) + ).withName("fuse3_file_info"); + static final VarHandle const$3 = constants$4.const$2.varHandle(MemoryLayout.PathElement.groupElement("flags")); + static final VarHandle const$4 = constants$4.const$2.varHandle(MemoryLayout.PathElement.groupElement("fh")); + static final VarHandle const$5 = constants$4.const$2.varHandle(MemoryLayout.PathElement.groupElement("lock_owner")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$5.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$5.java new file mode 100644 index 00000000..bcd3791d --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$5.java @@ -0,0 +1,37 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$5 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$5() {} + static final VarHandle const$0 = constants$4.const$2.varHandle(MemoryLayout.PathElement.groupElement("poll_events")); + static final StructLayout const$1 = MemoryLayout.structLayout( + JAVA_INT.withName("clone_fd"), + JAVA_INT.withName("max_idle_threads") + ).withName("fuse3_loop_config"); + static final VarHandle const$2 = constants$5.const$1.varHandle(MemoryLayout.PathElement.groupElement("clone_fd")); + static final VarHandle const$3 = constants$5.const$1.varHandle(MemoryLayout.PathElement.groupElement("max_idle_threads")); + static final StructLayout const$4 = MemoryLayout.structLayout( + JAVA_INT.withName("proto_major"), + JAVA_INT.withName("proto_minor"), + JAVA_INT.withName("max_write"), + JAVA_INT.withName("max_read"), + JAVA_INT.withName("max_readahead"), + JAVA_INT.withName("capable"), + JAVA_INT.withName("want"), + JAVA_INT.withName("max_background"), + JAVA_INT.withName("congestion_threshold"), + JAVA_INT.withName("time_gran"), + MemoryLayout.sequenceLayout(22, JAVA_INT).withName("reserved") + ).withName("fuse3_conn_info"); + static final VarHandle const$5 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("proto_major")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$6.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$6.java new file mode 100644 index 00000000..12634927 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$6.java @@ -0,0 +1,22 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$6 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$6() {} + static final VarHandle const$0 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("proto_minor")); + static final VarHandle const$1 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("max_write")); + static final VarHandle const$2 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("max_read")); + static final VarHandle const$3 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("max_readahead")); + static final VarHandle const$4 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("capable")); + static final VarHandle const$5 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("want")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$7.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$7.java new file mode 100644 index 00000000..493fb037 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$7.java @@ -0,0 +1,30 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$7 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$7() {} + static final VarHandle const$0 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("max_background")); + static final VarHandle const$1 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("congestion_threshold")); + static final VarHandle const$2 = constants$5.const$4.varHandle(MemoryLayout.PathElement.groupElement("time_gran")); + static final FunctionDescriptor const$3 = FunctionDescriptor.of(JAVA_INT, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + RuntimeHelper.POINTER, + JAVA_LONG, + JAVA_INT + ); + static final MethodHandle const$4 = RuntimeHelper.upcallHandle(fuse3_fill_dir_t.class, "apply", constants$7.const$3); + static final MethodHandle const$5 = RuntimeHelper.downcallHandle( + constants$7.const$3 + ); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$8.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$8.java new file mode 100644 index 00000000..6f9ac431 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$8.java @@ -0,0 +1,48 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$8 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$8() {} + static final StructLayout const$0 = MemoryLayout.structLayout( + JAVA_INT.withName("set_gid"), + JAVA_INT.withName("gid"), + JAVA_INT.withName("set_uid"), + JAVA_INT.withName("uid"), + JAVA_INT.withName("set_mode"), + JAVA_INT.withName("umask"), + JAVA_DOUBLE.withName("entry_timeout"), + JAVA_DOUBLE.withName("negative_timeout"), + JAVA_DOUBLE.withName("attr_timeout"), + JAVA_INT.withName("intr"), + JAVA_INT.withName("intr_signal"), + JAVA_INT.withName("remember"), + JAVA_INT.withName("hard_remove"), + JAVA_INT.withName("use_ino"), + JAVA_INT.withName("readdir_ino"), + JAVA_INT.withName("direct_io"), + JAVA_INT.withName("kernel_cache"), + JAVA_INT.withName("auto_cache"), + JAVA_INT.withName("ac_attr_timeout_set"), + JAVA_DOUBLE.withName("ac_attr_timeout"), + JAVA_INT.withName("nullpath_ok"), + JAVA_INT.withName("show_help"), + RuntimeHelper.POINTER.withName("modules"), + JAVA_INT.withName("debug"), + MemoryLayout.paddingLayout(4) + ).withName("fuse3_config"); + static final VarHandle const$1 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("set_gid")); + static final VarHandle const$2 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("gid")); + static final VarHandle const$3 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("set_uid")); + static final VarHandle const$4 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("uid")); + static final VarHandle const$5 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("set_mode")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$9.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$9.java new file mode 100644 index 00000000..d5b4d079 --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/constants$9.java @@ -0,0 +1,22 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +final class constants$9 { + + // Suppresses default constructor, ensuring non-instantiability. + private constants$9() {} + static final VarHandle const$0 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("umask")); + static final VarHandle const$1 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("entry_timeout")); + static final VarHandle const$2 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("negative_timeout")); + static final VarHandle const$3 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("attr_timeout")); + static final VarHandle const$4 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("intr")); + static final VarHandle const$5 = constants$8.const$0.varHandle(MemoryLayout.PathElement.groupElement("intr_signal")); +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_config.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_config.java similarity index 54% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_config.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_config.java index 3a289f31..359d2187 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_config.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_config.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -39,39 +39,11 @@ */ public class fuse3_config { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG$LAYOUT.withName("set_gid"), - Constants$root.C_LONG$LAYOUT.withName("gid"), - Constants$root.C_LONG$LAYOUT.withName("set_uid"), - Constants$root.C_LONG$LAYOUT.withName("uid"), - Constants$root.C_LONG$LAYOUT.withName("set_mode"), - Constants$root.C_LONG$LAYOUT.withName("umask"), - Constants$root.C_DOUBLE$LAYOUT.withName("entry_timeout"), - Constants$root.C_DOUBLE$LAYOUT.withName("negative_timeout"), - Constants$root.C_DOUBLE$LAYOUT.withName("attr_timeout"), - Constants$root.C_LONG$LAYOUT.withName("intr"), - Constants$root.C_LONG$LAYOUT.withName("intr_signal"), - Constants$root.C_LONG$LAYOUT.withName("remember"), - Constants$root.C_LONG$LAYOUT.withName("hard_remove"), - Constants$root.C_LONG$LAYOUT.withName("use_ino"), - Constants$root.C_LONG$LAYOUT.withName("readdir_ino"), - Constants$root.C_LONG$LAYOUT.withName("direct_io"), - Constants$root.C_LONG$LAYOUT.withName("kernel_cache"), - Constants$root.C_LONG$LAYOUT.withName("auto_cache"), - Constants$root.C_LONG$LAYOUT.withName("ac_attr_timeout_set"), - Constants$root.C_DOUBLE$LAYOUT.withName("ac_attr_timeout"), - Constants$root.C_LONG$LAYOUT.withName("nullpath_ok"), - Constants$root.C_LONG$LAYOUT.withName("show_help"), - Constants$root.C_POINTER$LAYOUT.withName("modules"), - Constants$root.C_LONG$LAYOUT.withName("debug"), - MemoryLayout.paddingLayout(32) - ).withName("fuse3_config"); public static MemoryLayout $LAYOUT() { - return fuse3_config.$struct$LAYOUT; + return constants$8.const$0; } - static final VarHandle set_gid$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("set_gid")); public static VarHandle set_gid$VH() { - return fuse3_config.set_gid$VH; + return constants$8.const$1; } /** * Getter for field: @@ -80,7 +52,7 @@ public class fuse3_config { * } */ public static int set_gid$get(MemorySegment seg) { - return (int)fuse3_config.set_gid$VH.get(seg); + return (int)constants$8.const$1.get(seg); } /** * Setter for field: @@ -89,17 +61,16 @@ public class fuse3_config { * } */ public static void set_gid$set(MemorySegment seg, int x) { - fuse3_config.set_gid$VH.set(seg, x); + constants$8.const$1.set(seg, x); } public static int set_gid$get(MemorySegment seg, long index) { - return (int)fuse3_config.set_gid$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$8.const$1.get(seg.asSlice(index*sizeof())); } public static void set_gid$set(MemorySegment seg, long index, int x) { - fuse3_config.set_gid$VH.set(seg.asSlice(index*sizeof()), x); + constants$8.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle gid$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("gid")); public static VarHandle gid$VH() { - return fuse3_config.gid$VH; + return constants$8.const$2; } /** * Getter for field: @@ -108,7 +79,7 @@ public class fuse3_config { * } */ public static int gid$get(MemorySegment seg) { - return (int)fuse3_config.gid$VH.get(seg); + return (int)constants$8.const$2.get(seg); } /** * Setter for field: @@ -117,17 +88,16 @@ public class fuse3_config { * } */ public static void gid$set(MemorySegment seg, int x) { - fuse3_config.gid$VH.set(seg, x); + constants$8.const$2.set(seg, x); } public static int gid$get(MemorySegment seg, long index) { - return (int)fuse3_config.gid$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$8.const$2.get(seg.asSlice(index*sizeof())); } public static void gid$set(MemorySegment seg, long index, int x) { - fuse3_config.gid$VH.set(seg.asSlice(index*sizeof()), x); + constants$8.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle set_uid$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("set_uid")); public static VarHandle set_uid$VH() { - return fuse3_config.set_uid$VH; + return constants$8.const$3; } /** * Getter for field: @@ -136,7 +106,7 @@ public class fuse3_config { * } */ public static int set_uid$get(MemorySegment seg) { - return (int)fuse3_config.set_uid$VH.get(seg); + return (int)constants$8.const$3.get(seg); } /** * Setter for field: @@ -145,17 +115,16 @@ public class fuse3_config { * } */ public static void set_uid$set(MemorySegment seg, int x) { - fuse3_config.set_uid$VH.set(seg, x); + constants$8.const$3.set(seg, x); } public static int set_uid$get(MemorySegment seg, long index) { - return (int)fuse3_config.set_uid$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$8.const$3.get(seg.asSlice(index*sizeof())); } public static void set_uid$set(MemorySegment seg, long index, int x) { - fuse3_config.set_uid$VH.set(seg.asSlice(index*sizeof()), x); + constants$8.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle uid$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("uid")); public static VarHandle uid$VH() { - return fuse3_config.uid$VH; + return constants$8.const$4; } /** * Getter for field: @@ -164,7 +133,7 @@ public class fuse3_config { * } */ public static int uid$get(MemorySegment seg) { - return (int)fuse3_config.uid$VH.get(seg); + return (int)constants$8.const$4.get(seg); } /** * Setter for field: @@ -173,17 +142,16 @@ public class fuse3_config { * } */ public static void uid$set(MemorySegment seg, int x) { - fuse3_config.uid$VH.set(seg, x); + constants$8.const$4.set(seg, x); } public static int uid$get(MemorySegment seg, long index) { - return (int)fuse3_config.uid$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$8.const$4.get(seg.asSlice(index*sizeof())); } public static void uid$set(MemorySegment seg, long index, int x) { - fuse3_config.uid$VH.set(seg.asSlice(index*sizeof()), x); + constants$8.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle set_mode$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("set_mode")); public static VarHandle set_mode$VH() { - return fuse3_config.set_mode$VH; + return constants$8.const$5; } /** * Getter for field: @@ -192,7 +160,7 @@ public class fuse3_config { * } */ public static int set_mode$get(MemorySegment seg) { - return (int)fuse3_config.set_mode$VH.get(seg); + return (int)constants$8.const$5.get(seg); } /** * Setter for field: @@ -201,17 +169,16 @@ public class fuse3_config { * } */ public static void set_mode$set(MemorySegment seg, int x) { - fuse3_config.set_mode$VH.set(seg, x); + constants$8.const$5.set(seg, x); } public static int set_mode$get(MemorySegment seg, long index) { - return (int)fuse3_config.set_mode$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$8.const$5.get(seg.asSlice(index*sizeof())); } public static void set_mode$set(MemorySegment seg, long index, int x) { - fuse3_config.set_mode$VH.set(seg.asSlice(index*sizeof()), x); + constants$8.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle umask$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("umask")); public static VarHandle umask$VH() { - return fuse3_config.umask$VH; + return constants$9.const$0; } /** * Getter for field: @@ -220,7 +187,7 @@ public class fuse3_config { * } */ public static int umask$get(MemorySegment seg) { - return (int)fuse3_config.umask$VH.get(seg); + return (int)constants$9.const$0.get(seg); } /** * Setter for field: @@ -229,17 +196,16 @@ public class fuse3_config { * } */ public static void umask$set(MemorySegment seg, int x) { - fuse3_config.umask$VH.set(seg, x); + constants$9.const$0.set(seg, x); } public static int umask$get(MemorySegment seg, long index) { - return (int)fuse3_config.umask$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$9.const$0.get(seg.asSlice(index*sizeof())); } public static void umask$set(MemorySegment seg, long index, int x) { - fuse3_config.umask$VH.set(seg.asSlice(index*sizeof()), x); + constants$9.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle entry_timeout$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("entry_timeout")); public static VarHandle entry_timeout$VH() { - return fuse3_config.entry_timeout$VH; + return constants$9.const$1; } /** * Getter for field: @@ -248,7 +214,7 @@ public class fuse3_config { * } */ public static double entry_timeout$get(MemorySegment seg) { - return (double)fuse3_config.entry_timeout$VH.get(seg); + return (double)constants$9.const$1.get(seg); } /** * Setter for field: @@ -257,17 +223,16 @@ public class fuse3_config { * } */ public static void entry_timeout$set(MemorySegment seg, double x) { - fuse3_config.entry_timeout$VH.set(seg, x); + constants$9.const$1.set(seg, x); } public static double entry_timeout$get(MemorySegment seg, long index) { - return (double)fuse3_config.entry_timeout$VH.get(seg.asSlice(index*sizeof())); + return (double)constants$9.const$1.get(seg.asSlice(index*sizeof())); } public static void entry_timeout$set(MemorySegment seg, long index, double x) { - fuse3_config.entry_timeout$VH.set(seg.asSlice(index*sizeof()), x); + constants$9.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle negative_timeout$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("negative_timeout")); public static VarHandle negative_timeout$VH() { - return fuse3_config.negative_timeout$VH; + return constants$9.const$2; } /** * Getter for field: @@ -276,7 +241,7 @@ public class fuse3_config { * } */ public static double negative_timeout$get(MemorySegment seg) { - return (double)fuse3_config.negative_timeout$VH.get(seg); + return (double)constants$9.const$2.get(seg); } /** * Setter for field: @@ -285,17 +250,16 @@ public class fuse3_config { * } */ public static void negative_timeout$set(MemorySegment seg, double x) { - fuse3_config.negative_timeout$VH.set(seg, x); + constants$9.const$2.set(seg, x); } public static double negative_timeout$get(MemorySegment seg, long index) { - return (double)fuse3_config.negative_timeout$VH.get(seg.asSlice(index*sizeof())); + return (double)constants$9.const$2.get(seg.asSlice(index*sizeof())); } public static void negative_timeout$set(MemorySegment seg, long index, double x) { - fuse3_config.negative_timeout$VH.set(seg.asSlice(index*sizeof()), x); + constants$9.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle attr_timeout$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("attr_timeout")); public static VarHandle attr_timeout$VH() { - return fuse3_config.attr_timeout$VH; + return constants$9.const$3; } /** * Getter for field: @@ -304,7 +268,7 @@ public class fuse3_config { * } */ public static double attr_timeout$get(MemorySegment seg) { - return (double)fuse3_config.attr_timeout$VH.get(seg); + return (double)constants$9.const$3.get(seg); } /** * Setter for field: @@ -313,17 +277,16 @@ public class fuse3_config { * } */ public static void attr_timeout$set(MemorySegment seg, double x) { - fuse3_config.attr_timeout$VH.set(seg, x); + constants$9.const$3.set(seg, x); } public static double attr_timeout$get(MemorySegment seg, long index) { - return (double)fuse3_config.attr_timeout$VH.get(seg.asSlice(index*sizeof())); + return (double)constants$9.const$3.get(seg.asSlice(index*sizeof())); } public static void attr_timeout$set(MemorySegment seg, long index, double x) { - fuse3_config.attr_timeout$VH.set(seg.asSlice(index*sizeof()), x); + constants$9.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle intr$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("intr")); public static VarHandle intr$VH() { - return fuse3_config.intr$VH; + return constants$9.const$4; } /** * Getter for field: @@ -332,7 +295,7 @@ public class fuse3_config { * } */ public static int intr$get(MemorySegment seg) { - return (int)fuse3_config.intr$VH.get(seg); + return (int)constants$9.const$4.get(seg); } /** * Setter for field: @@ -341,17 +304,16 @@ public class fuse3_config { * } */ public static void intr$set(MemorySegment seg, int x) { - fuse3_config.intr$VH.set(seg, x); + constants$9.const$4.set(seg, x); } public static int intr$get(MemorySegment seg, long index) { - return (int)fuse3_config.intr$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$9.const$4.get(seg.asSlice(index*sizeof())); } public static void intr$set(MemorySegment seg, long index, int x) { - fuse3_config.intr$VH.set(seg.asSlice(index*sizeof()), x); + constants$9.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle intr_signal$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("intr_signal")); public static VarHandle intr_signal$VH() { - return fuse3_config.intr_signal$VH; + return constants$9.const$5; } /** * Getter for field: @@ -360,7 +322,7 @@ public class fuse3_config { * } */ public static int intr_signal$get(MemorySegment seg) { - return (int)fuse3_config.intr_signal$VH.get(seg); + return (int)constants$9.const$5.get(seg); } /** * Setter for field: @@ -369,17 +331,16 @@ public class fuse3_config { * } */ public static void intr_signal$set(MemorySegment seg, int x) { - fuse3_config.intr_signal$VH.set(seg, x); + constants$9.const$5.set(seg, x); } public static int intr_signal$get(MemorySegment seg, long index) { - return (int)fuse3_config.intr_signal$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$9.const$5.get(seg.asSlice(index*sizeof())); } public static void intr_signal$set(MemorySegment seg, long index, int x) { - fuse3_config.intr_signal$VH.set(seg.asSlice(index*sizeof()), x); + constants$9.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle remember$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("remember")); public static VarHandle remember$VH() { - return fuse3_config.remember$VH; + return constants$10.const$0; } /** * Getter for field: @@ -388,7 +349,7 @@ public class fuse3_config { * } */ public static int remember$get(MemorySegment seg) { - return (int)fuse3_config.remember$VH.get(seg); + return (int)constants$10.const$0.get(seg); } /** * Setter for field: @@ -397,17 +358,16 @@ public class fuse3_config { * } */ public static void remember$set(MemorySegment seg, int x) { - fuse3_config.remember$VH.set(seg, x); + constants$10.const$0.set(seg, x); } public static int remember$get(MemorySegment seg, long index) { - return (int)fuse3_config.remember$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$10.const$0.get(seg.asSlice(index*sizeof())); } public static void remember$set(MemorySegment seg, long index, int x) { - fuse3_config.remember$VH.set(seg.asSlice(index*sizeof()), x); + constants$10.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle hard_remove$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("hard_remove")); public static VarHandle hard_remove$VH() { - return fuse3_config.hard_remove$VH; + return constants$10.const$1; } /** * Getter for field: @@ -416,7 +376,7 @@ public class fuse3_config { * } */ public static int hard_remove$get(MemorySegment seg) { - return (int)fuse3_config.hard_remove$VH.get(seg); + return (int)constants$10.const$1.get(seg); } /** * Setter for field: @@ -425,17 +385,16 @@ public class fuse3_config { * } */ public static void hard_remove$set(MemorySegment seg, int x) { - fuse3_config.hard_remove$VH.set(seg, x); + constants$10.const$1.set(seg, x); } public static int hard_remove$get(MemorySegment seg, long index) { - return (int)fuse3_config.hard_remove$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$10.const$1.get(seg.asSlice(index*sizeof())); } public static void hard_remove$set(MemorySegment seg, long index, int x) { - fuse3_config.hard_remove$VH.set(seg.asSlice(index*sizeof()), x); + constants$10.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle use_ino$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("use_ino")); public static VarHandle use_ino$VH() { - return fuse3_config.use_ino$VH; + return constants$10.const$2; } /** * Getter for field: @@ -444,7 +403,7 @@ public class fuse3_config { * } */ public static int use_ino$get(MemorySegment seg) { - return (int)fuse3_config.use_ino$VH.get(seg); + return (int)constants$10.const$2.get(seg); } /** * Setter for field: @@ -453,17 +412,16 @@ public class fuse3_config { * } */ public static void use_ino$set(MemorySegment seg, int x) { - fuse3_config.use_ino$VH.set(seg, x); + constants$10.const$2.set(seg, x); } public static int use_ino$get(MemorySegment seg, long index) { - return (int)fuse3_config.use_ino$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$10.const$2.get(seg.asSlice(index*sizeof())); } public static void use_ino$set(MemorySegment seg, long index, int x) { - fuse3_config.use_ino$VH.set(seg.asSlice(index*sizeof()), x); + constants$10.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle readdir_ino$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("readdir_ino")); public static VarHandle readdir_ino$VH() { - return fuse3_config.readdir_ino$VH; + return constants$10.const$3; } /** * Getter for field: @@ -472,7 +430,7 @@ public class fuse3_config { * } */ public static int readdir_ino$get(MemorySegment seg) { - return (int)fuse3_config.readdir_ino$VH.get(seg); + return (int)constants$10.const$3.get(seg); } /** * Setter for field: @@ -481,17 +439,16 @@ public class fuse3_config { * } */ public static void readdir_ino$set(MemorySegment seg, int x) { - fuse3_config.readdir_ino$VH.set(seg, x); + constants$10.const$3.set(seg, x); } public static int readdir_ino$get(MemorySegment seg, long index) { - return (int)fuse3_config.readdir_ino$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$10.const$3.get(seg.asSlice(index*sizeof())); } public static void readdir_ino$set(MemorySegment seg, long index, int x) { - fuse3_config.readdir_ino$VH.set(seg.asSlice(index*sizeof()), x); + constants$10.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle direct_io$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("direct_io")); public static VarHandle direct_io$VH() { - return fuse3_config.direct_io$VH; + return constants$10.const$4; } /** * Getter for field: @@ -500,7 +457,7 @@ public class fuse3_config { * } */ public static int direct_io$get(MemorySegment seg) { - return (int)fuse3_config.direct_io$VH.get(seg); + return (int)constants$10.const$4.get(seg); } /** * Setter for field: @@ -509,17 +466,16 @@ public class fuse3_config { * } */ public static void direct_io$set(MemorySegment seg, int x) { - fuse3_config.direct_io$VH.set(seg, x); + constants$10.const$4.set(seg, x); } public static int direct_io$get(MemorySegment seg, long index) { - return (int)fuse3_config.direct_io$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$10.const$4.get(seg.asSlice(index*sizeof())); } public static void direct_io$set(MemorySegment seg, long index, int x) { - fuse3_config.direct_io$VH.set(seg.asSlice(index*sizeof()), x); + constants$10.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle kernel_cache$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("kernel_cache")); public static VarHandle kernel_cache$VH() { - return fuse3_config.kernel_cache$VH; + return constants$10.const$5; } /** * Getter for field: @@ -528,7 +484,7 @@ public class fuse3_config { * } */ public static int kernel_cache$get(MemorySegment seg) { - return (int)fuse3_config.kernel_cache$VH.get(seg); + return (int)constants$10.const$5.get(seg); } /** * Setter for field: @@ -537,17 +493,16 @@ public class fuse3_config { * } */ public static void kernel_cache$set(MemorySegment seg, int x) { - fuse3_config.kernel_cache$VH.set(seg, x); + constants$10.const$5.set(seg, x); } public static int kernel_cache$get(MemorySegment seg, long index) { - return (int)fuse3_config.kernel_cache$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$10.const$5.get(seg.asSlice(index*sizeof())); } public static void kernel_cache$set(MemorySegment seg, long index, int x) { - fuse3_config.kernel_cache$VH.set(seg.asSlice(index*sizeof()), x); + constants$10.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle auto_cache$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("auto_cache")); public static VarHandle auto_cache$VH() { - return fuse3_config.auto_cache$VH; + return constants$11.const$0; } /** * Getter for field: @@ -556,7 +511,7 @@ public class fuse3_config { * } */ public static int auto_cache$get(MemorySegment seg) { - return (int)fuse3_config.auto_cache$VH.get(seg); + return (int)constants$11.const$0.get(seg); } /** * Setter for field: @@ -565,17 +520,16 @@ public class fuse3_config { * } */ public static void auto_cache$set(MemorySegment seg, int x) { - fuse3_config.auto_cache$VH.set(seg, x); + constants$11.const$0.set(seg, x); } public static int auto_cache$get(MemorySegment seg, long index) { - return (int)fuse3_config.auto_cache$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$11.const$0.get(seg.asSlice(index*sizeof())); } public static void auto_cache$set(MemorySegment seg, long index, int x) { - fuse3_config.auto_cache$VH.set(seg.asSlice(index*sizeof()), x); + constants$11.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle ac_attr_timeout_set$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("ac_attr_timeout_set")); public static VarHandle ac_attr_timeout_set$VH() { - return fuse3_config.ac_attr_timeout_set$VH; + return constants$11.const$1; } /** * Getter for field: @@ -584,7 +538,7 @@ public class fuse3_config { * } */ public static int ac_attr_timeout_set$get(MemorySegment seg) { - return (int)fuse3_config.ac_attr_timeout_set$VH.get(seg); + return (int)constants$11.const$1.get(seg); } /** * Setter for field: @@ -593,17 +547,16 @@ public class fuse3_config { * } */ public static void ac_attr_timeout_set$set(MemorySegment seg, int x) { - fuse3_config.ac_attr_timeout_set$VH.set(seg, x); + constants$11.const$1.set(seg, x); } public static int ac_attr_timeout_set$get(MemorySegment seg, long index) { - return (int)fuse3_config.ac_attr_timeout_set$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$11.const$1.get(seg.asSlice(index*sizeof())); } public static void ac_attr_timeout_set$set(MemorySegment seg, long index, int x) { - fuse3_config.ac_attr_timeout_set$VH.set(seg.asSlice(index*sizeof()), x); + constants$11.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle ac_attr_timeout$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("ac_attr_timeout")); public static VarHandle ac_attr_timeout$VH() { - return fuse3_config.ac_attr_timeout$VH; + return constants$11.const$2; } /** * Getter for field: @@ -612,7 +565,7 @@ public class fuse3_config { * } */ public static double ac_attr_timeout$get(MemorySegment seg) { - return (double)fuse3_config.ac_attr_timeout$VH.get(seg); + return (double)constants$11.const$2.get(seg); } /** * Setter for field: @@ -621,17 +574,16 @@ public class fuse3_config { * } */ public static void ac_attr_timeout$set(MemorySegment seg, double x) { - fuse3_config.ac_attr_timeout$VH.set(seg, x); + constants$11.const$2.set(seg, x); } public static double ac_attr_timeout$get(MemorySegment seg, long index) { - return (double)fuse3_config.ac_attr_timeout$VH.get(seg.asSlice(index*sizeof())); + return (double)constants$11.const$2.get(seg.asSlice(index*sizeof())); } public static void ac_attr_timeout$set(MemorySegment seg, long index, double x) { - fuse3_config.ac_attr_timeout$VH.set(seg.asSlice(index*sizeof()), x); + constants$11.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle nullpath_ok$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("nullpath_ok")); public static VarHandle nullpath_ok$VH() { - return fuse3_config.nullpath_ok$VH; + return constants$11.const$3; } /** * Getter for field: @@ -640,7 +592,7 @@ public class fuse3_config { * } */ public static int nullpath_ok$get(MemorySegment seg) { - return (int)fuse3_config.nullpath_ok$VH.get(seg); + return (int)constants$11.const$3.get(seg); } /** * Setter for field: @@ -649,17 +601,16 @@ public class fuse3_config { * } */ public static void nullpath_ok$set(MemorySegment seg, int x) { - fuse3_config.nullpath_ok$VH.set(seg, x); + constants$11.const$3.set(seg, x); } public static int nullpath_ok$get(MemorySegment seg, long index) { - return (int)fuse3_config.nullpath_ok$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$11.const$3.get(seg.asSlice(index*sizeof())); } public static void nullpath_ok$set(MemorySegment seg, long index, int x) { - fuse3_config.nullpath_ok$VH.set(seg.asSlice(index*sizeof()), x); + constants$11.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle show_help$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("show_help")); public static VarHandle show_help$VH() { - return fuse3_config.show_help$VH; + return constants$11.const$4; } /** * Getter for field: @@ -668,7 +619,7 @@ public class fuse3_config { * } */ public static int show_help$get(MemorySegment seg) { - return (int)fuse3_config.show_help$VH.get(seg); + return (int)constants$11.const$4.get(seg); } /** * Setter for field: @@ -677,17 +628,16 @@ public class fuse3_config { * } */ public static void show_help$set(MemorySegment seg, int x) { - fuse3_config.show_help$VH.set(seg, x); + constants$11.const$4.set(seg, x); } public static int show_help$get(MemorySegment seg, long index) { - return (int)fuse3_config.show_help$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$11.const$4.get(seg.asSlice(index*sizeof())); } public static void show_help$set(MemorySegment seg, long index, int x) { - fuse3_config.show_help$VH.set(seg.asSlice(index*sizeof()), x); + constants$11.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle modules$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("modules")); public static VarHandle modules$VH() { - return fuse3_config.modules$VH; + return constants$11.const$5; } /** * Getter for field: @@ -696,7 +646,7 @@ public class fuse3_config { * } */ public static MemorySegment modules$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_config.modules$VH.get(seg); + return (java.lang.foreign.MemorySegment)constants$11.const$5.get(seg); } /** * Setter for field: @@ -705,17 +655,16 @@ public class fuse3_config { * } */ public static void modules$set(MemorySegment seg, MemorySegment x) { - fuse3_config.modules$VH.set(seg, x); + constants$11.const$5.set(seg, x); } public static MemorySegment modules$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_config.modules$VH.get(seg.asSlice(index*sizeof())); + return (java.lang.foreign.MemorySegment)constants$11.const$5.get(seg.asSlice(index*sizeof())); } public static void modules$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_config.modules$VH.set(seg.asSlice(index*sizeof()), x); + constants$11.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle debug$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("debug")); public static VarHandle debug$VH() { - return fuse3_config.debug$VH; + return constants$12.const$0; } /** * Getter for field: @@ -724,7 +673,7 @@ public class fuse3_config { * } */ public static int debug$get(MemorySegment seg) { - return (int)fuse3_config.debug$VH.get(seg); + return (int)constants$12.const$0.get(seg); } /** * Setter for field: @@ -733,20 +682,20 @@ public class fuse3_config { * } */ public static void debug$set(MemorySegment seg, int x) { - fuse3_config.debug$VH.set(seg, x); + constants$12.const$0.set(seg, x); } public static int debug$get(MemorySegment seg, long index) { - return (int)fuse3_config.debug$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$12.const$0.get(seg.asSlice(index*sizeof())); } public static void debug$set(MemorySegment seg, long index, int x) { - fuse3_config.debug$VH.set(seg.asSlice(index*sizeof()), x); + constants$12.const$0.set(seg.asSlice(index*sizeof()), x); } public static long sizeof() { return $LAYOUT().byteSize(); } public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_conn_info.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_conn_info.java similarity index 55% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_conn_info.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_conn_info.java index 415a3b40..686f3ab9 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_conn_info.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_conn_info.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -26,25 +26,11 @@ */ public class fuse3_conn_info { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG$LAYOUT.withName("proto_major"), - Constants$root.C_LONG$LAYOUT.withName("proto_minor"), - Constants$root.C_LONG$LAYOUT.withName("max_write"), - Constants$root.C_LONG$LAYOUT.withName("max_read"), - Constants$root.C_LONG$LAYOUT.withName("max_readahead"), - Constants$root.C_LONG$LAYOUT.withName("capable"), - Constants$root.C_LONG$LAYOUT.withName("want"), - Constants$root.C_LONG$LAYOUT.withName("max_background"), - Constants$root.C_LONG$LAYOUT.withName("congestion_threshold"), - Constants$root.C_LONG$LAYOUT.withName("time_gran"), - MemoryLayout.sequenceLayout(22, Constants$root.C_LONG$LAYOUT).withName("reserved") - ).withName("fuse3_conn_info"); public static MemoryLayout $LAYOUT() { - return fuse3_conn_info.$struct$LAYOUT; + return constants$5.const$4; } - static final VarHandle proto_major$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("proto_major")); public static VarHandle proto_major$VH() { - return fuse3_conn_info.proto_major$VH; + return constants$5.const$5; } /** * Getter for field: @@ -53,7 +39,7 @@ public class fuse3_conn_info { * } */ public static int proto_major$get(MemorySegment seg) { - return (int)fuse3_conn_info.proto_major$VH.get(seg); + return (int)constants$5.const$5.get(seg); } /** * Setter for field: @@ -62,17 +48,16 @@ public class fuse3_conn_info { * } */ public static void proto_major$set(MemorySegment seg, int x) { - fuse3_conn_info.proto_major$VH.set(seg, x); + constants$5.const$5.set(seg, x); } public static int proto_major$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.proto_major$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$5.const$5.get(seg.asSlice(index*sizeof())); } public static void proto_major$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.proto_major$VH.set(seg.asSlice(index*sizeof()), x); + constants$5.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle proto_minor$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("proto_minor")); public static VarHandle proto_minor$VH() { - return fuse3_conn_info.proto_minor$VH; + return constants$6.const$0; } /** * Getter for field: @@ -81,7 +66,7 @@ public class fuse3_conn_info { * } */ public static int proto_minor$get(MemorySegment seg) { - return (int)fuse3_conn_info.proto_minor$VH.get(seg); + return (int)constants$6.const$0.get(seg); } /** * Setter for field: @@ -90,17 +75,16 @@ public class fuse3_conn_info { * } */ public static void proto_minor$set(MemorySegment seg, int x) { - fuse3_conn_info.proto_minor$VH.set(seg, x); + constants$6.const$0.set(seg, x); } public static int proto_minor$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.proto_minor$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$6.const$0.get(seg.asSlice(index*sizeof())); } public static void proto_minor$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.proto_minor$VH.set(seg.asSlice(index*sizeof()), x); + constants$6.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle max_write$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("max_write")); public static VarHandle max_write$VH() { - return fuse3_conn_info.max_write$VH; + return constants$6.const$1; } /** * Getter for field: @@ -109,7 +93,7 @@ public class fuse3_conn_info { * } */ public static int max_write$get(MemorySegment seg) { - return (int)fuse3_conn_info.max_write$VH.get(seg); + return (int)constants$6.const$1.get(seg); } /** * Setter for field: @@ -118,17 +102,16 @@ public class fuse3_conn_info { * } */ public static void max_write$set(MemorySegment seg, int x) { - fuse3_conn_info.max_write$VH.set(seg, x); + constants$6.const$1.set(seg, x); } public static int max_write$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.max_write$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$6.const$1.get(seg.asSlice(index*sizeof())); } public static void max_write$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.max_write$VH.set(seg.asSlice(index*sizeof()), x); + constants$6.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle max_read$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("max_read")); public static VarHandle max_read$VH() { - return fuse3_conn_info.max_read$VH; + return constants$6.const$2; } /** * Getter for field: @@ -137,7 +120,7 @@ public class fuse3_conn_info { * } */ public static int max_read$get(MemorySegment seg) { - return (int)fuse3_conn_info.max_read$VH.get(seg); + return (int)constants$6.const$2.get(seg); } /** * Setter for field: @@ -146,17 +129,16 @@ public class fuse3_conn_info { * } */ public static void max_read$set(MemorySegment seg, int x) { - fuse3_conn_info.max_read$VH.set(seg, x); + constants$6.const$2.set(seg, x); } public static int max_read$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.max_read$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$6.const$2.get(seg.asSlice(index*sizeof())); } public static void max_read$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.max_read$VH.set(seg.asSlice(index*sizeof()), x); + constants$6.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle max_readahead$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("max_readahead")); public static VarHandle max_readahead$VH() { - return fuse3_conn_info.max_readahead$VH; + return constants$6.const$3; } /** * Getter for field: @@ -165,7 +147,7 @@ public class fuse3_conn_info { * } */ public static int max_readahead$get(MemorySegment seg) { - return (int)fuse3_conn_info.max_readahead$VH.get(seg); + return (int)constants$6.const$3.get(seg); } /** * Setter for field: @@ -174,17 +156,16 @@ public class fuse3_conn_info { * } */ public static void max_readahead$set(MemorySegment seg, int x) { - fuse3_conn_info.max_readahead$VH.set(seg, x); + constants$6.const$3.set(seg, x); } public static int max_readahead$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.max_readahead$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$6.const$3.get(seg.asSlice(index*sizeof())); } public static void max_readahead$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.max_readahead$VH.set(seg.asSlice(index*sizeof()), x); + constants$6.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle capable$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("capable")); public static VarHandle capable$VH() { - return fuse3_conn_info.capable$VH; + return constants$6.const$4; } /** * Getter for field: @@ -193,7 +174,7 @@ public class fuse3_conn_info { * } */ public static int capable$get(MemorySegment seg) { - return (int)fuse3_conn_info.capable$VH.get(seg); + return (int)constants$6.const$4.get(seg); } /** * Setter for field: @@ -202,17 +183,16 @@ public class fuse3_conn_info { * } */ public static void capable$set(MemorySegment seg, int x) { - fuse3_conn_info.capable$VH.set(seg, x); + constants$6.const$4.set(seg, x); } public static int capable$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.capable$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$6.const$4.get(seg.asSlice(index*sizeof())); } public static void capable$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.capable$VH.set(seg.asSlice(index*sizeof()), x); + constants$6.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle want$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("want")); public static VarHandle want$VH() { - return fuse3_conn_info.want$VH; + return constants$6.const$5; } /** * Getter for field: @@ -221,7 +201,7 @@ public class fuse3_conn_info { * } */ public static int want$get(MemorySegment seg) { - return (int)fuse3_conn_info.want$VH.get(seg); + return (int)constants$6.const$5.get(seg); } /** * Setter for field: @@ -230,17 +210,16 @@ public class fuse3_conn_info { * } */ public static void want$set(MemorySegment seg, int x) { - fuse3_conn_info.want$VH.set(seg, x); + constants$6.const$5.set(seg, x); } public static int want$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.want$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$6.const$5.get(seg.asSlice(index*sizeof())); } public static void want$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.want$VH.set(seg.asSlice(index*sizeof()), x); + constants$6.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle max_background$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("max_background")); public static VarHandle max_background$VH() { - return fuse3_conn_info.max_background$VH; + return constants$7.const$0; } /** * Getter for field: @@ -249,7 +228,7 @@ public class fuse3_conn_info { * } */ public static int max_background$get(MemorySegment seg) { - return (int)fuse3_conn_info.max_background$VH.get(seg); + return (int)constants$7.const$0.get(seg); } /** * Setter for field: @@ -258,17 +237,16 @@ public class fuse3_conn_info { * } */ public static void max_background$set(MemorySegment seg, int x) { - fuse3_conn_info.max_background$VH.set(seg, x); + constants$7.const$0.set(seg, x); } public static int max_background$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.max_background$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$7.const$0.get(seg.asSlice(index*sizeof())); } public static void max_background$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.max_background$VH.set(seg.asSlice(index*sizeof()), x); + constants$7.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle congestion_threshold$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("congestion_threshold")); public static VarHandle congestion_threshold$VH() { - return fuse3_conn_info.congestion_threshold$VH; + return constants$7.const$1; } /** * Getter for field: @@ -277,7 +255,7 @@ public class fuse3_conn_info { * } */ public static int congestion_threshold$get(MemorySegment seg) { - return (int)fuse3_conn_info.congestion_threshold$VH.get(seg); + return (int)constants$7.const$1.get(seg); } /** * Setter for field: @@ -286,17 +264,16 @@ public class fuse3_conn_info { * } */ public static void congestion_threshold$set(MemorySegment seg, int x) { - fuse3_conn_info.congestion_threshold$VH.set(seg, x); + constants$7.const$1.set(seg, x); } public static int congestion_threshold$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.congestion_threshold$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$7.const$1.get(seg.asSlice(index*sizeof())); } public static void congestion_threshold$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.congestion_threshold$VH.set(seg.asSlice(index*sizeof()), x); + constants$7.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle time_gran$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("time_gran")); public static VarHandle time_gran$VH() { - return fuse3_conn_info.time_gran$VH; + return constants$7.const$2; } /** * Getter for field: @@ -305,7 +282,7 @@ public class fuse3_conn_info { * } */ public static int time_gran$get(MemorySegment seg) { - return (int)fuse3_conn_info.time_gran$VH.get(seg); + return (int)constants$7.const$2.get(seg); } /** * Setter for field: @@ -314,13 +291,13 @@ public class fuse3_conn_info { * } */ public static void time_gran$set(MemorySegment seg, int x) { - fuse3_conn_info.time_gran$VH.set(seg, x); + constants$7.const$2.set(seg, x); } public static int time_gran$get(MemorySegment seg, long index) { - return (int)fuse3_conn_info.time_gran$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$7.const$2.get(seg.asSlice(index*sizeof())); } public static void time_gran$set(MemorySegment seg, long index, int x) { - fuse3_conn_info.time_gran$VH.set(seg.asSlice(index*sizeof()), x); + constants$7.const$2.set(seg.asSlice(index*sizeof()), x); } public static MemorySegment reserved$slice(MemorySegment seg) { return seg.asSlice(40, 88); @@ -330,7 +307,7 @@ public class fuse3_conn_info { public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_file_info.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_file_info.java similarity index 52% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_file_info.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_file_info.java index 5b341929..ce028fb9 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_file_info.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_file_info.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -26,30 +26,11 @@ */ public class fuse3_file_info { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG$LAYOUT.withName("flags"), - MemoryLayout.structLayout( - MemoryLayout.paddingLayout(1).withName("writepage"), - MemoryLayout.paddingLayout(1).withName("direct_io"), - MemoryLayout.paddingLayout(1).withName("keep_cache"), - MemoryLayout.paddingLayout(1).withName("flush"), - MemoryLayout.paddingLayout(1).withName("nonseekable"), - MemoryLayout.paddingLayout(1).withName("flock_release"), - MemoryLayout.paddingLayout(26), - MemoryLayout.paddingLayout(27).withName("padding"), - MemoryLayout.paddingLayout(37) - ), - Constants$root.C_LONG_LONG$LAYOUT.withName("fh"), - Constants$root.C_LONG_LONG$LAYOUT.withName("lock_owner"), - Constants$root.C_LONG$LAYOUT.withName("poll_events"), - MemoryLayout.paddingLayout(32) - ).withName("fuse3_file_info"); public static MemoryLayout $LAYOUT() { - return fuse3_file_info.$struct$LAYOUT; + return constants$4.const$2; } - static final VarHandle flags$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("flags")); public static VarHandle flags$VH() { - return fuse3_file_info.flags$VH; + return constants$4.const$3; } /** * Getter for field: @@ -58,7 +39,7 @@ public class fuse3_file_info { * } */ public static int flags$get(MemorySegment seg) { - return (int)fuse3_file_info.flags$VH.get(seg); + return (int)constants$4.const$3.get(seg); } /** * Setter for field: @@ -67,17 +48,16 @@ public class fuse3_file_info { * } */ public static void flags$set(MemorySegment seg, int x) { - fuse3_file_info.flags$VH.set(seg, x); + constants$4.const$3.set(seg, x); } public static int flags$get(MemorySegment seg, long index) { - return (int)fuse3_file_info.flags$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$4.const$3.get(seg.asSlice(index*sizeof())); } public static void flags$set(MemorySegment seg, long index, int x) { - fuse3_file_info.flags$VH.set(seg.asSlice(index*sizeof()), x); + constants$4.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle fh$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("fh")); public static VarHandle fh$VH() { - return fuse3_file_info.fh$VH; + return constants$4.const$4; } /** * Getter for field: @@ -86,7 +66,7 @@ public class fuse3_file_info { * } */ public static long fh$get(MemorySegment seg) { - return (long)fuse3_file_info.fh$VH.get(seg); + return (long)constants$4.const$4.get(seg); } /** * Setter for field: @@ -95,17 +75,16 @@ public class fuse3_file_info { * } */ public static void fh$set(MemorySegment seg, long x) { - fuse3_file_info.fh$VH.set(seg, x); + constants$4.const$4.set(seg, x); } public static long fh$get(MemorySegment seg, long index) { - return (long)fuse3_file_info.fh$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$4.const$4.get(seg.asSlice(index*sizeof())); } public static void fh$set(MemorySegment seg, long index, long x) { - fuse3_file_info.fh$VH.set(seg.asSlice(index*sizeof()), x); + constants$4.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle lock_owner$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("lock_owner")); public static VarHandle lock_owner$VH() { - return fuse3_file_info.lock_owner$VH; + return constants$4.const$5; } /** * Getter for field: @@ -114,7 +93,7 @@ public class fuse3_file_info { * } */ public static long lock_owner$get(MemorySegment seg) { - return (long)fuse3_file_info.lock_owner$VH.get(seg); + return (long)constants$4.const$5.get(seg); } /** * Setter for field: @@ -123,17 +102,16 @@ public class fuse3_file_info { * } */ public static void lock_owner$set(MemorySegment seg, long x) { - fuse3_file_info.lock_owner$VH.set(seg, x); + constants$4.const$5.set(seg, x); } public static long lock_owner$get(MemorySegment seg, long index) { - return (long)fuse3_file_info.lock_owner$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$4.const$5.get(seg.asSlice(index*sizeof())); } public static void lock_owner$set(MemorySegment seg, long index, long x) { - fuse3_file_info.lock_owner$VH.set(seg.asSlice(index*sizeof()), x); + constants$4.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle poll_events$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("poll_events")); public static VarHandle poll_events$VH() { - return fuse3_file_info.poll_events$VH; + return constants$5.const$0; } /** * Getter for field: @@ -142,7 +120,7 @@ public class fuse3_file_info { * } */ public static int poll_events$get(MemorySegment seg) { - return (int)fuse3_file_info.poll_events$VH.get(seg); + return (int)constants$5.const$0.get(seg); } /** * Setter for field: @@ -151,20 +129,20 @@ public class fuse3_file_info { * } */ public static void poll_events$set(MemorySegment seg, int x) { - fuse3_file_info.poll_events$VH.set(seg, x); + constants$5.const$0.set(seg, x); } public static int poll_events$get(MemorySegment seg, long index) { - return (int)fuse3_file_info.poll_events$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$5.const$0.get(seg.asSlice(index*sizeof())); } public static void poll_events$set(MemorySegment seg, long index, int x) { - fuse3_file_info.poll_events$VH.set(seg.asSlice(index*sizeof()), x); + constants$5.const$0.set(seg.asSlice(index*sizeof()), x); } public static long sizeof() { return $LAYOUT().byteSize(); } public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_fill_dir_t.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_fill_dir_t.java similarity index 63% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_fill_dir_t.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_fill_dir_t.java index 345c9526..8fde60fa 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_fill_dir_t.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_fill_dir_t.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -15,14 +15,14 @@ public interface fuse3_fill_dir_t { int apply(java.lang.foreign.MemorySegment buf, java.lang.foreign.MemorySegment name, java.lang.foreign.MemorySegment stbuf, long off, int flags); - static MemorySegment allocate(fuse3_fill_dir_t fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(fuse3_fill_dir_t.class, fi, constants$0.fuse3_fill_dir_t$FUNC, scope); + static MemorySegment allocate(fuse3_fill_dir_t fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$7.const$4, fi, constants$7.const$3, scope); } - static fuse3_fill_dir_t ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); + static fuse3_fill_dir_t ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); return (java.lang.foreign.MemorySegment _buf, java.lang.foreign.MemorySegment _name, java.lang.foreign.MemorySegment _stbuf, long _off, int _flags) -> { try { - return (int)constants$0.fuse3_fill_dir_t$MH.invokeExact(symbol, _buf, _name, _stbuf, _off, _flags); + return (int)constants$7.const$5.invokeExact(symbol, _buf, _name, _stbuf, _off, _flags); } catch (Throwable ex$) { throw new AssertionError("should not reach here", ex$); } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_loop_config.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_loop_config.java similarity index 57% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_loop_config.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_loop_config.java index 8a48caec..f324be86 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_loop_config.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_loop_config.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -17,16 +17,11 @@ */ public class fuse3_loop_config { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG$LAYOUT.withName("clone_fd"), - Constants$root.C_LONG$LAYOUT.withName("max_idle_threads") - ).withName("fuse3_loop_config"); public static MemoryLayout $LAYOUT() { - return fuse3_loop_config.$struct$LAYOUT; + return constants$5.const$1; } - static final VarHandle clone_fd$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("clone_fd")); public static VarHandle clone_fd$VH() { - return fuse3_loop_config.clone_fd$VH; + return constants$5.const$2; } /** * Getter for field: @@ -35,7 +30,7 @@ public class fuse3_loop_config { * } */ public static int clone_fd$get(MemorySegment seg) { - return (int)fuse3_loop_config.clone_fd$VH.get(seg); + return (int)constants$5.const$2.get(seg); } /** * Setter for field: @@ -44,17 +39,16 @@ public class fuse3_loop_config { * } */ public static void clone_fd$set(MemorySegment seg, int x) { - fuse3_loop_config.clone_fd$VH.set(seg, x); + constants$5.const$2.set(seg, x); } public static int clone_fd$get(MemorySegment seg, long index) { - return (int)fuse3_loop_config.clone_fd$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$5.const$2.get(seg.asSlice(index*sizeof())); } public static void clone_fd$set(MemorySegment seg, long index, int x) { - fuse3_loop_config.clone_fd$VH.set(seg.asSlice(index*sizeof()), x); + constants$5.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle max_idle_threads$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("max_idle_threads")); public static VarHandle max_idle_threads$VH() { - return fuse3_loop_config.max_idle_threads$VH; + return constants$5.const$3; } /** * Getter for field: @@ -63,7 +57,7 @@ public class fuse3_loop_config { * } */ public static int max_idle_threads$get(MemorySegment seg) { - return (int)fuse3_loop_config.max_idle_threads$VH.get(seg); + return (int)constants$5.const$3.get(seg); } /** * Setter for field: @@ -72,20 +66,20 @@ public class fuse3_loop_config { * } */ public static void max_idle_threads$set(MemorySegment seg, int x) { - fuse3_loop_config.max_idle_threads$VH.set(seg, x); + constants$5.const$3.set(seg, x); } public static int max_idle_threads$get(MemorySegment seg, long index) { - return (int)fuse3_loop_config.max_idle_threads$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$5.const$3.get(seg.asSlice(index*sizeof())); } public static void max_idle_threads$set(MemorySegment seg, long index, int x) { - fuse3_loop_config.max_idle_threads$VH.set(seg.asSlice(index*sizeof()), x); + constants$5.const$3.set(seg.asSlice(index*sizeof()), x); } public static long sizeof() { return $LAYOUT().byteSize(); } public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_operations.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_operations.java new file mode 100644 index 00000000..6fab8fcd --- /dev/null +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse3_operations.java @@ -0,0 +1,2189 @@ +// Generated by jextract + +package org.cryptomator.jfuse.win.extr.fuse3; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.VarHandle; +import java.nio.ByteOrder; +import java.lang.foreign.*; +import static java.lang.foreign.ValueLayout.*; +/** + * {@snippet : + * struct fuse3_operations { + * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); + * int (*readlink)(char*,char*,unsigned long long); + * int (*mknod)(char*,unsigned int,unsigned int); + * int (*mkdir)(char*,unsigned int); + * int (*unlink)(char*); + * int (*rmdir)(char*); + * int (*symlink)(char*,char*); + * int (*rename)(char*,char*,unsigned int); + * int (*link)(char*,char*); + * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); + * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); + * int (*truncate)(char*,long long,struct fuse3_file_info*); + * int (*open)(char*,struct fuse3_file_info*); + * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * int (*statfs)(char*,struct fuse_statvfs*); + * int (*flush)(char*,struct fuse3_file_info*); + * int (*release)(char*,struct fuse3_file_info*); + * int (*fsync)(char*,int,struct fuse3_file_info*); + * int (*setxattr)(char*,char*,char*,unsigned long long,int); + * int (*getxattr)(char*,char*,char*,unsigned long long); + * int (*listxattr)(char*,char*,unsigned long long); + * int (*removexattr)(char*,char*); + * int (*opendir)(char*,struct fuse3_file_info*); + * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); + * int (*releasedir)(char*,struct fuse3_file_info*); + * int (*fsyncdir)(char*,int,struct fuse3_file_info*); + * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); + * void (*destroy)(void*); + * int (*access)(char*,int); + * int (*create)(char*,unsigned int,struct fuse3_file_info*); + * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); + * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); + * int (*bmap)(char*,unsigned long long,unsigned long long*); + * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); + * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); + * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); + * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); + * int (*flock)(char*,struct fuse3_file_info*,int); + * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); + * }; + * } + */ +public class fuse3_operations { + + public static MemoryLayout $LAYOUT() { + return constants$12.const$1; + } + /** + * {@snippet : + * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); + * } + */ + public interface getattr { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(getattr fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$12.const$3, fi, constants$12.const$2, scope); + } + static getattr ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$12.const$4.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle getattr$VH() { + return constants$12.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); + * } + */ + public static MemorySegment getattr$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$12.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); + * } + */ + public static void getattr$set(MemorySegment seg, MemorySegment x) { + constants$12.const$5.set(seg, x); + } + public static MemorySegment getattr$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$12.const$5.get(seg.asSlice(index*sizeof())); + } + public static void getattr$set(MemorySegment seg, long index, MemorySegment x) { + constants$12.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static getattr getattr(MemorySegment segment, Arena scope) { + return getattr.ofAddress(getattr$get(segment), scope); + } + /** + * {@snippet : + * int (*readlink)(char*,char*,unsigned long long); + * } + */ + public interface readlink { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2); + static MemorySegment allocate(readlink fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$13.const$1, fi, constants$13.const$0, scope); + } + static readlink ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2) -> { + try { + return (int)constants$13.const$2.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle readlink$VH() { + return constants$13.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*readlink)(char*,char*,unsigned long long); + * } + */ + public static MemorySegment readlink$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$13.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*readlink)(char*,char*,unsigned long long); + * } + */ + public static void readlink$set(MemorySegment seg, MemorySegment x) { + constants$13.const$3.set(seg, x); + } + public static MemorySegment readlink$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$13.const$3.get(seg.asSlice(index*sizeof())); + } + public static void readlink$set(MemorySegment seg, long index, MemorySegment x) { + constants$13.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static readlink readlink(MemorySegment segment, Arena scope) { + return readlink.ofAddress(readlink$get(segment), scope); + } + /** + * {@snippet : + * int (*mknod)(char*,unsigned int,unsigned int); + * } + */ + public interface mknod { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, int _x2); + static MemorySegment allocate(mknod fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$13.const$5, fi, constants$13.const$4, scope); + } + static mknod ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2) -> { + try { + return (int)constants$14.const$0.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle mknod$VH() { + return constants$14.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*mknod)(char*,unsigned int,unsigned int); + * } + */ + public static MemorySegment mknod$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$14.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*mknod)(char*,unsigned int,unsigned int); + * } + */ + public static void mknod$set(MemorySegment seg, MemorySegment x) { + constants$14.const$1.set(seg, x); + } + public static MemorySegment mknod$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$14.const$1.get(seg.asSlice(index*sizeof())); + } + public static void mknod$set(MemorySegment seg, long index, MemorySegment x) { + constants$14.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static mknod mknod(MemorySegment segment, Arena scope) { + return mknod.ofAddress(mknod$get(segment), scope); + } + /** + * {@snippet : + * int (*mkdir)(char*,unsigned int); + * } + */ + public interface mkdir { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1); + static MemorySegment allocate(mkdir fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$14.const$3, fi, constants$14.const$2, scope); + } + static mkdir ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1) -> { + try { + return (int)constants$14.const$4.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle mkdir$VH() { + return constants$14.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*mkdir)(char*,unsigned int); + * } + */ + public static MemorySegment mkdir$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$14.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*mkdir)(char*,unsigned int); + * } + */ + public static void mkdir$set(MemorySegment seg, MemorySegment x) { + constants$14.const$5.set(seg, x); + } + public static MemorySegment mkdir$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$14.const$5.get(seg.asSlice(index*sizeof())); + } + public static void mkdir$set(MemorySegment seg, long index, MemorySegment x) { + constants$14.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static mkdir mkdir(MemorySegment segment, Arena scope) { + return mkdir.ofAddress(mkdir$get(segment), scope); + } + /** + * {@snippet : + * int (*unlink)(char*); + * } + */ + public interface unlink { + + int apply(java.lang.foreign.MemorySegment _x0); + static MemorySegment allocate(unlink fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$15.const$1, fi, constants$15.const$0, scope); + } + static unlink ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0) -> { + try { + return (int)constants$15.const$2.invokeExact(symbol, __x0); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle unlink$VH() { + return constants$15.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*unlink)(char*); + * } + */ + public static MemorySegment unlink$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$15.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*unlink)(char*); + * } + */ + public static void unlink$set(MemorySegment seg, MemorySegment x) { + constants$15.const$3.set(seg, x); + } + public static MemorySegment unlink$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$15.const$3.get(seg.asSlice(index*sizeof())); + } + public static void unlink$set(MemorySegment seg, long index, MemorySegment x) { + constants$15.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static unlink unlink(MemorySegment segment, Arena scope) { + return unlink.ofAddress(unlink$get(segment), scope); + } + /** + * {@snippet : + * int (*rmdir)(char*); + * } + */ + public interface rmdir { + + int apply(java.lang.foreign.MemorySegment _x0); + static MemorySegment allocate(rmdir fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$15.const$4, fi, constants$15.const$0, scope); + } + static rmdir ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0) -> { + try { + return (int)constants$15.const$2.invokeExact(symbol, __x0); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle rmdir$VH() { + return constants$15.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*rmdir)(char*); + * } + */ + public static MemorySegment rmdir$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$15.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*rmdir)(char*); + * } + */ + public static void rmdir$set(MemorySegment seg, MemorySegment x) { + constants$15.const$5.set(seg, x); + } + public static MemorySegment rmdir$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$15.const$5.get(seg.asSlice(index*sizeof())); + } + public static void rmdir$set(MemorySegment seg, long index, MemorySegment x) { + constants$15.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static rmdir rmdir(MemorySegment segment, Arena scope) { + return rmdir.ofAddress(rmdir$get(segment), scope); + } + /** + * {@snippet : + * int (*symlink)(char*,char*); + * } + */ + public interface symlink { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(symlink fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$16.const$1, fi, constants$16.const$0, scope); + } + static symlink ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle symlink$VH() { + return constants$16.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*symlink)(char*,char*); + * } + */ + public static MemorySegment symlink$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$16.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*symlink)(char*,char*); + * } + */ + public static void symlink$set(MemorySegment seg, MemorySegment x) { + constants$16.const$3.set(seg, x); + } + public static MemorySegment symlink$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$16.const$3.get(seg.asSlice(index*sizeof())); + } + public static void symlink$set(MemorySegment seg, long index, MemorySegment x) { + constants$16.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static symlink symlink(MemorySegment segment, Arena scope) { + return symlink.ofAddress(symlink$get(segment), scope); + } + /** + * {@snippet : + * int (*rename)(char*,char*,unsigned int); + * } + */ + public interface rename { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, int _x2); + static MemorySegment allocate(rename fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$16.const$5, fi, constants$16.const$4, scope); + } + static rename ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, int __x2) -> { + try { + return (int)constants$17.const$0.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle rename$VH() { + return constants$17.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*rename)(char*,char*,unsigned int); + * } + */ + public static MemorySegment rename$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$17.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*rename)(char*,char*,unsigned int); + * } + */ + public static void rename$set(MemorySegment seg, MemorySegment x) { + constants$17.const$1.set(seg, x); + } + public static MemorySegment rename$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$17.const$1.get(seg.asSlice(index*sizeof())); + } + public static void rename$set(MemorySegment seg, long index, MemorySegment x) { + constants$17.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static rename rename(MemorySegment segment, Arena scope) { + return rename.ofAddress(rename$get(segment), scope); + } + /** + * {@snippet : + * int (*link)(char*,char*); + * } + */ + public interface link { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(link fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$17.const$2, fi, constants$16.const$0, scope); + } + static link ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle link$VH() { + return constants$17.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*link)(char*,char*); + * } + */ + public static MemorySegment link$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$17.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*link)(char*,char*); + * } + */ + public static void link$set(MemorySegment seg, MemorySegment x) { + constants$17.const$3.set(seg, x); + } + public static MemorySegment link$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$17.const$3.get(seg.asSlice(index*sizeof())); + } + public static void link$set(MemorySegment seg, long index, MemorySegment x) { + constants$17.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static link link(MemorySegment segment, Arena scope) { + return link.ofAddress(link$get(segment), scope); + } + /** + * {@snippet : + * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); + * } + */ + public interface chmod { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(chmod fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$17.const$5, fi, constants$17.const$4, scope); + } + static chmod ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$18.const$0.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle chmod$VH() { + return constants$18.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); + * } + */ + public static MemorySegment chmod$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$18.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); + * } + */ + public static void chmod$set(MemorySegment seg, MemorySegment x) { + constants$18.const$1.set(seg, x); + } + public static MemorySegment chmod$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$18.const$1.get(seg.asSlice(index*sizeof())); + } + public static void chmod$set(MemorySegment seg, long index, MemorySegment x) { + constants$18.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static chmod chmod(MemorySegment segment, Arena scope) { + return chmod.ofAddress(chmod$get(segment), scope); + } + /** + * {@snippet : + * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); + * } + */ + public interface chown { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, int _x2, java.lang.foreign.MemorySegment _x3); + static MemorySegment allocate(chown fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$18.const$3, fi, constants$18.const$2, scope); + } + static chown ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2, java.lang.foreign.MemorySegment __x3) -> { + try { + return (int)constants$18.const$4.invokeExact(symbol, __x0, __x1, __x2, __x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle chown$VH() { + return constants$18.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); + * } + */ + public static MemorySegment chown$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$18.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); + * } + */ + public static void chown$set(MemorySegment seg, MemorySegment x) { + constants$18.const$5.set(seg, x); + } + public static MemorySegment chown$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$18.const$5.get(seg.asSlice(index*sizeof())); + } + public static void chown$set(MemorySegment seg, long index, MemorySegment x) { + constants$18.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static chown chown(MemorySegment segment, Arena scope) { + return chown.ofAddress(chown$get(segment), scope); + } + /** + * {@snippet : + * int (*truncate)(char*,long long,struct fuse3_file_info*); + * } + */ + public interface truncate { + + int apply(java.lang.foreign.MemorySegment _x0, long _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(truncate fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$19.const$1, fi, constants$19.const$0, scope); + } + static truncate ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, long __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$19.const$2.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle truncate$VH() { + return constants$19.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*truncate)(char*,long long,struct fuse3_file_info*); + * } + */ + public static MemorySegment truncate$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$19.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*truncate)(char*,long long,struct fuse3_file_info*); + * } + */ + public static void truncate$set(MemorySegment seg, MemorySegment x) { + constants$19.const$3.set(seg, x); + } + public static MemorySegment truncate$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$19.const$3.get(seg.asSlice(index*sizeof())); + } + public static void truncate$set(MemorySegment seg, long index, MemorySegment x) { + constants$19.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static truncate truncate(MemorySegment segment, Arena scope) { + return truncate.ofAddress(truncate$get(segment), scope); + } + /** + * {@snippet : + * int (*open)(char*,struct fuse3_file_info*); + * } + */ + public interface open { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(open fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$19.const$4, fi, constants$16.const$0, scope); + } + static open ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle open$VH() { + return constants$19.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*open)(char*,struct fuse3_file_info*); + * } + */ + public static MemorySegment open$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$19.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*open)(char*,struct fuse3_file_info*); + * } + */ + public static void open$set(MemorySegment seg, MemorySegment x) { + constants$19.const$5.set(seg, x); + } + public static MemorySegment open$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$19.const$5.get(seg.asSlice(index*sizeof())); + } + public static void open$set(MemorySegment seg, long index, MemorySegment x) { + constants$19.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static open open(MemorySegment segment, Arena scope) { + return open.ofAddress(open$get(segment), scope); + } + /** + * {@snippet : + * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public interface read { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); + static MemorySegment allocate(read fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$20.const$1, fi, constants$20.const$0, scope); + } + static read ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { + try { + return (int)constants$20.const$2.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle read$VH() { + return constants$20.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public static MemorySegment read$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$20.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public static void read$set(MemorySegment seg, MemorySegment x) { + constants$20.const$3.set(seg, x); + } + public static MemorySegment read$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$20.const$3.get(seg.asSlice(index*sizeof())); + } + public static void read$set(MemorySegment seg, long index, MemorySegment x) { + constants$20.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static read read(MemorySegment segment, Arena scope) { + return read.ofAddress(read$get(segment), scope); + } + /** + * {@snippet : + * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public interface write { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); + static MemorySegment allocate(write fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$20.const$4, fi, constants$20.const$0, scope); + } + static write ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { + try { + return (int)constants$20.const$2.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle write$VH() { + return constants$20.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public static MemorySegment write$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$20.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public static void write$set(MemorySegment seg, MemorySegment x) { + constants$20.const$5.set(seg, x); + } + public static MemorySegment write$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$20.const$5.get(seg.asSlice(index*sizeof())); + } + public static void write$set(MemorySegment seg, long index, MemorySegment x) { + constants$20.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static write write(MemorySegment segment, Arena scope) { + return write.ofAddress(write$get(segment), scope); + } + /** + * {@snippet : + * int (*statfs)(char*,struct fuse_statvfs*); + * } + */ + public interface statfs { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(statfs fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$21.const$0, fi, constants$16.const$0, scope); + } + static statfs ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle statfs$VH() { + return constants$21.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*statfs)(char*,struct fuse_statvfs*); + * } + */ + public static MemorySegment statfs$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$21.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*statfs)(char*,struct fuse_statvfs*); + * } + */ + public static void statfs$set(MemorySegment seg, MemorySegment x) { + constants$21.const$1.set(seg, x); + } + public static MemorySegment statfs$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$21.const$1.get(seg.asSlice(index*sizeof())); + } + public static void statfs$set(MemorySegment seg, long index, MemorySegment x) { + constants$21.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static statfs statfs(MemorySegment segment, Arena scope) { + return statfs.ofAddress(statfs$get(segment), scope); + } + /** + * {@snippet : + * int (*flush)(char*,struct fuse3_file_info*); + * } + */ + public interface flush { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(flush fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$21.const$2, fi, constants$16.const$0, scope); + } + static flush ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle flush$VH() { + return constants$21.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*flush)(char*,struct fuse3_file_info*); + * } + */ + public static MemorySegment flush$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$21.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*flush)(char*,struct fuse3_file_info*); + * } + */ + public static void flush$set(MemorySegment seg, MemorySegment x) { + constants$21.const$3.set(seg, x); + } + public static MemorySegment flush$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$21.const$3.get(seg.asSlice(index*sizeof())); + } + public static void flush$set(MemorySegment seg, long index, MemorySegment x) { + constants$21.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static flush flush(MemorySegment segment, Arena scope) { + return flush.ofAddress(flush$get(segment), scope); + } + /** + * {@snippet : + * int (*release)(char*,struct fuse3_file_info*); + * } + */ + public interface release { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(release fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$21.const$4, fi, constants$16.const$0, scope); + } + static release ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle release$VH() { + return constants$21.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*release)(char*,struct fuse3_file_info*); + * } + */ + public static MemorySegment release$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$21.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*release)(char*,struct fuse3_file_info*); + * } + */ + public static void release$set(MemorySegment seg, MemorySegment x) { + constants$21.const$5.set(seg, x); + } + public static MemorySegment release$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$21.const$5.get(seg.asSlice(index*sizeof())); + } + public static void release$set(MemorySegment seg, long index, MemorySegment x) { + constants$21.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static release release(MemorySegment segment, Arena scope) { + return release.ofAddress(release$get(segment), scope); + } + /** + * {@snippet : + * int (*fsync)(char*,int,struct fuse3_file_info*); + * } + */ + public interface fsync { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(fsync fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$22.const$0, fi, constants$17.const$4, scope); + } + static fsync ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$18.const$0.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle fsync$VH() { + return constants$22.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*fsync)(char*,int,struct fuse3_file_info*); + * } + */ + public static MemorySegment fsync$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$22.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*fsync)(char*,int,struct fuse3_file_info*); + * } + */ + public static void fsync$set(MemorySegment seg, MemorySegment x) { + constants$22.const$1.set(seg, x); + } + public static MemorySegment fsync$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$22.const$1.get(seg.asSlice(index*sizeof())); + } + public static void fsync$set(MemorySegment seg, long index, MemorySegment x) { + constants$22.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static fsync fsync(MemorySegment segment, Arena scope) { + return fsync.ofAddress(fsync$get(segment), scope); + } + /** + * {@snippet : + * int (*setxattr)(char*,char*,char*,unsigned long long,int); + * } + */ + public interface setxattr { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, long _x3, int _x4); + static MemorySegment allocate(setxattr fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$22.const$2, fi, constants$7.const$3, scope); + } + static setxattr ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, long __x3, int __x4) -> { + try { + return (int)constants$7.const$5.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle setxattr$VH() { + return constants$22.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*setxattr)(char*,char*,char*,unsigned long long,int); + * } + */ + public static MemorySegment setxattr$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$22.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*setxattr)(char*,char*,char*,unsigned long long,int); + * } + */ + public static void setxattr$set(MemorySegment seg, MemorySegment x) { + constants$22.const$3.set(seg, x); + } + public static MemorySegment setxattr$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$22.const$3.get(seg.asSlice(index*sizeof())); + } + public static void setxattr$set(MemorySegment seg, long index, MemorySegment x) { + constants$22.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static setxattr setxattr(MemorySegment segment, Arena scope) { + return setxattr.ofAddress(setxattr$get(segment), scope); + } + /** + * {@snippet : + * int (*getxattr)(char*,char*,char*,unsigned long long); + * } + */ + public interface getxattr { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, long _x3); + static MemorySegment allocate(getxattr fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$22.const$5, fi, constants$22.const$4, scope); + } + static getxattr ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, long __x3) -> { + try { + return (int)constants$23.const$0.invokeExact(symbol, __x0, __x1, __x2, __x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle getxattr$VH() { + return constants$23.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*getxattr)(char*,char*,char*,unsigned long long); + * } + */ + public static MemorySegment getxattr$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$23.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*getxattr)(char*,char*,char*,unsigned long long); + * } + */ + public static void getxattr$set(MemorySegment seg, MemorySegment x) { + constants$23.const$1.set(seg, x); + } + public static MemorySegment getxattr$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$23.const$1.get(seg.asSlice(index*sizeof())); + } + public static void getxattr$set(MemorySegment seg, long index, MemorySegment x) { + constants$23.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static getxattr getxattr(MemorySegment segment, Arena scope) { + return getxattr.ofAddress(getxattr$get(segment), scope); + } + /** + * {@snippet : + * int (*listxattr)(char*,char*,unsigned long long); + * } + */ + public interface listxattr { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2); + static MemorySegment allocate(listxattr fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$23.const$2, fi, constants$13.const$0, scope); + } + static listxattr ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2) -> { + try { + return (int)constants$13.const$2.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle listxattr$VH() { + return constants$23.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*listxattr)(char*,char*,unsigned long long); + * } + */ + public static MemorySegment listxattr$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$23.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*listxattr)(char*,char*,unsigned long long); + * } + */ + public static void listxattr$set(MemorySegment seg, MemorySegment x) { + constants$23.const$3.set(seg, x); + } + public static MemorySegment listxattr$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$23.const$3.get(seg.asSlice(index*sizeof())); + } + public static void listxattr$set(MemorySegment seg, long index, MemorySegment x) { + constants$23.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static listxattr listxattr(MemorySegment segment, Arena scope) { + return listxattr.ofAddress(listxattr$get(segment), scope); + } + /** + * {@snippet : + * int (*removexattr)(char*,char*); + * } + */ + public interface removexattr { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(removexattr fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$23.const$4, fi, constants$16.const$0, scope); + } + static removexattr ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle removexattr$VH() { + return constants$23.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*removexattr)(char*,char*); + * } + */ + public static MemorySegment removexattr$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$23.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*removexattr)(char*,char*); + * } + */ + public static void removexattr$set(MemorySegment seg, MemorySegment x) { + constants$23.const$5.set(seg, x); + } + public static MemorySegment removexattr$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$23.const$5.get(seg.asSlice(index*sizeof())); + } + public static void removexattr$set(MemorySegment seg, long index, MemorySegment x) { + constants$23.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static removexattr removexattr(MemorySegment segment, Arena scope) { + return removexattr.ofAddress(removexattr$get(segment), scope); + } + /** + * {@snippet : + * int (*opendir)(char*,struct fuse3_file_info*); + * } + */ + public interface opendir { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(opendir fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$24.const$0, fi, constants$16.const$0, scope); + } + static opendir ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle opendir$VH() { + return constants$24.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*opendir)(char*,struct fuse3_file_info*); + * } + */ + public static MemorySegment opendir$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$24.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*opendir)(char*,struct fuse3_file_info*); + * } + */ + public static void opendir$set(MemorySegment seg, MemorySegment x) { + constants$24.const$1.set(seg, x); + } + public static MemorySegment opendir$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$24.const$1.get(seg.asSlice(index*sizeof())); + } + public static void opendir$set(MemorySegment seg, long index, MemorySegment x) { + constants$24.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static opendir opendir(MemorySegment segment, Arena scope) { + return opendir.ofAddress(opendir$get(segment), scope); + } + /** + * {@snippet : + * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); + * } + */ + public interface readdir { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, long _x3, java.lang.foreign.MemorySegment _x4, int _x5); + static MemorySegment allocate(readdir fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$24.const$3, fi, constants$24.const$2, scope); + } + static readdir ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, long __x3, java.lang.foreign.MemorySegment __x4, int __x5) -> { + try { + return (int)constants$24.const$4.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4, __x5); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle readdir$VH() { + return constants$24.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); + * } + */ + public static MemorySegment readdir$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$24.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); + * } + */ + public static void readdir$set(MemorySegment seg, MemorySegment x) { + constants$24.const$5.set(seg, x); + } + public static MemorySegment readdir$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$24.const$5.get(seg.asSlice(index*sizeof())); + } + public static void readdir$set(MemorySegment seg, long index, MemorySegment x) { + constants$24.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static readdir readdir(MemorySegment segment, Arena scope) { + return readdir.ofAddress(readdir$get(segment), scope); + } + /** + * {@snippet : + * int (*releasedir)(char*,struct fuse3_file_info*); + * } + */ + public interface releasedir { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(releasedir fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$25.const$0, fi, constants$16.const$0, scope); + } + static releasedir ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (int)constants$16.const$2.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle releasedir$VH() { + return constants$25.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*releasedir)(char*,struct fuse3_file_info*); + * } + */ + public static MemorySegment releasedir$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$25.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*releasedir)(char*,struct fuse3_file_info*); + * } + */ + public static void releasedir$set(MemorySegment seg, MemorySegment x) { + constants$25.const$1.set(seg, x); + } + public static MemorySegment releasedir$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$25.const$1.get(seg.asSlice(index*sizeof())); + } + public static void releasedir$set(MemorySegment seg, long index, MemorySegment x) { + constants$25.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static releasedir releasedir(MemorySegment segment, Arena scope) { + return releasedir.ofAddress(releasedir$get(segment), scope); + } + /** + * {@snippet : + * int (*fsyncdir)(char*,int,struct fuse3_file_info*); + * } + */ + public interface fsyncdir { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(fsyncdir fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$25.const$2, fi, constants$17.const$4, scope); + } + static fsyncdir ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$18.const$0.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle fsyncdir$VH() { + return constants$25.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*fsyncdir)(char*,int,struct fuse3_file_info*); + * } + */ + public static MemorySegment fsyncdir$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$25.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*fsyncdir)(char*,int,struct fuse3_file_info*); + * } + */ + public static void fsyncdir$set(MemorySegment seg, MemorySegment x) { + constants$25.const$3.set(seg, x); + } + public static MemorySegment fsyncdir$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$25.const$3.get(seg.asSlice(index*sizeof())); + } + public static void fsyncdir$set(MemorySegment seg, long index, MemorySegment x) { + constants$25.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static fsyncdir fsyncdir(MemorySegment segment, Arena scope) { + return fsyncdir.ofAddress(fsyncdir$get(segment), scope); + } + /** + * {@snippet : + * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); + * } + */ + public interface init { + + java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); + static MemorySegment allocate(init fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$25.const$5, fi, constants$25.const$4, scope); + } + static init ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { + try { + return (java.lang.foreign.MemorySegment)constants$26.const$0.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle init$VH() { + return constants$26.const$1; + } + /** + * Getter for field: + * {@snippet : + * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); + * } + */ + public static MemorySegment init$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$26.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); + * } + */ + public static void init$set(MemorySegment seg, MemorySegment x) { + constants$26.const$1.set(seg, x); + } + public static MemorySegment init$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$26.const$1.get(seg.asSlice(index*sizeof())); + } + public static void init$set(MemorySegment seg, long index, MemorySegment x) { + constants$26.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static init init(MemorySegment segment, Arena scope) { + return init.ofAddress(init$get(segment), scope); + } + /** + * {@snippet : + * void (*destroy)(void*); + * } + */ + public interface destroy { + + void apply(java.lang.foreign.MemorySegment _x0); + static MemorySegment allocate(destroy fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$26.const$3, fi, constants$26.const$2, scope); + } + static destroy ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0) -> { + try { + constants$26.const$4.invokeExact(symbol, __x0); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle destroy$VH() { + return constants$26.const$5; + } + /** + * Getter for field: + * {@snippet : + * void (*destroy)(void*); + * } + */ + public static MemorySegment destroy$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$26.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * void (*destroy)(void*); + * } + */ + public static void destroy$set(MemorySegment seg, MemorySegment x) { + constants$26.const$5.set(seg, x); + } + public static MemorySegment destroy$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$26.const$5.get(seg.asSlice(index*sizeof())); + } + public static void destroy$set(MemorySegment seg, long index, MemorySegment x) { + constants$26.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static destroy destroy(MemorySegment segment, Arena scope) { + return destroy.ofAddress(destroy$get(segment), scope); + } + /** + * {@snippet : + * int (*access)(char*,int); + * } + */ + public interface access { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1); + static MemorySegment allocate(access fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$27.const$0, fi, constants$14.const$2, scope); + } + static access ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1) -> { + try { + return (int)constants$14.const$4.invokeExact(symbol, __x0, __x1); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle access$VH() { + return constants$27.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*access)(char*,int); + * } + */ + public static MemorySegment access$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$27.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*access)(char*,int); + * } + */ + public static void access$set(MemorySegment seg, MemorySegment x) { + constants$27.const$1.set(seg, x); + } + public static MemorySegment access$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$27.const$1.get(seg.asSlice(index*sizeof())); + } + public static void access$set(MemorySegment seg, long index, MemorySegment x) { + constants$27.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static access access(MemorySegment segment, Arena scope) { + return access.ofAddress(access$get(segment), scope); + } + /** + * {@snippet : + * int (*create)(char*,unsigned int,struct fuse3_file_info*); + * } + */ + public interface create { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(create fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$27.const$2, fi, constants$17.const$4, scope); + } + static create ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$18.const$0.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle create$VH() { + return constants$27.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*create)(char*,unsigned int,struct fuse3_file_info*); + * } + */ + public static MemorySegment create$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$27.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*create)(char*,unsigned int,struct fuse3_file_info*); + * } + */ + public static void create$set(MemorySegment seg, MemorySegment x) { + constants$27.const$3.set(seg, x); + } + public static MemorySegment create$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$27.const$3.get(seg.asSlice(index*sizeof())); + } + public static void create$set(MemorySegment seg, long index, MemorySegment x) { + constants$27.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static create create(MemorySegment segment, Arena scope) { + return create.ofAddress(create$get(segment), scope); + } + /** + * {@snippet : + * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); + * } + */ + public interface lock { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, int _x2, java.lang.foreign.MemorySegment _x3); + static MemorySegment allocate(lock fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$27.const$5, fi, constants$27.const$4, scope); + } + static lock ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, int __x2, java.lang.foreign.MemorySegment __x3) -> { + try { + return (int)constants$28.const$0.invokeExact(symbol, __x0, __x1, __x2, __x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle lock$VH() { + return constants$28.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); + * } + */ + public static MemorySegment lock$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$28.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); + * } + */ + public static void lock$set(MemorySegment seg, MemorySegment x) { + constants$28.const$1.set(seg, x); + } + public static MemorySegment lock$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$28.const$1.get(seg.asSlice(index*sizeof())); + } + public static void lock$set(MemorySegment seg, long index, MemorySegment x) { + constants$28.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static lock lock(MemorySegment segment, Arena scope) { + return lock.ofAddress(lock$get(segment), scope); + } + /** + * {@snippet : + * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); + * } + */ + public interface utimens { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(utimens fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$28.const$2, fi, constants$12.const$2, scope); + } + static utimens ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$12.const$4.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle utimens$VH() { + return constants$28.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); + * } + */ + public static MemorySegment utimens$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$28.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); + * } + */ + public static void utimens$set(MemorySegment seg, MemorySegment x) { + constants$28.const$3.set(seg, x); + } + public static MemorySegment utimens$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$28.const$3.get(seg.asSlice(index*sizeof())); + } + public static void utimens$set(MemorySegment seg, long index, MemorySegment x) { + constants$28.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static utimens utimens(MemorySegment segment, Arena scope) { + return utimens.ofAddress(utimens$get(segment), scope); + } + /** + * {@snippet : + * int (*bmap)(char*,unsigned long long,unsigned long long*); + * } + */ + public interface bmap { + + int apply(java.lang.foreign.MemorySegment _x0, long _x1, java.lang.foreign.MemorySegment _x2); + static MemorySegment allocate(bmap fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$28.const$4, fi, constants$19.const$0, scope); + } + static bmap ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, long __x1, java.lang.foreign.MemorySegment __x2) -> { + try { + return (int)constants$19.const$2.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle bmap$VH() { + return constants$28.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*bmap)(char*,unsigned long long,unsigned long long*); + * } + */ + public static MemorySegment bmap$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$28.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*bmap)(char*,unsigned long long,unsigned long long*); + * } + */ + public static void bmap$set(MemorySegment seg, MemorySegment x) { + constants$28.const$5.set(seg, x); + } + public static MemorySegment bmap$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$28.const$5.get(seg.asSlice(index*sizeof())); + } + public static void bmap$set(MemorySegment seg, long index, MemorySegment x) { + constants$28.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static bmap bmap(MemorySegment segment, Arena scope) { + return bmap.ofAddress(bmap$get(segment), scope); + } + /** + * {@snippet : + * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); + * } + */ + public interface ioctl { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3, int _x4, java.lang.foreign.MemorySegment _x5); + static MemorySegment allocate(ioctl fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$29.const$1, fi, constants$29.const$0, scope); + } + static ioctl ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3, int __x4, java.lang.foreign.MemorySegment __x5) -> { + try { + return (int)constants$29.const$2.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4, __x5); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle ioctl$VH() { + return constants$29.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); + * } + */ + public static MemorySegment ioctl$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$29.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); + * } + */ + public static void ioctl$set(MemorySegment seg, MemorySegment x) { + constants$29.const$3.set(seg, x); + } + public static MemorySegment ioctl$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$29.const$3.get(seg.asSlice(index*sizeof())); + } + public static void ioctl$set(MemorySegment seg, long index, MemorySegment x) { + constants$29.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static ioctl ioctl(MemorySegment segment, Arena scope) { + return ioctl.ofAddress(ioctl$get(segment), scope); + } + /** + * {@snippet : + * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); + * } + */ + public interface poll { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3); + static MemorySegment allocate(poll fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$29.const$5, fi, constants$29.const$4, scope); + } + static poll ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3) -> { + try { + return (int)constants$30.const$0.invokeExact(symbol, __x0, __x1, __x2, __x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle poll$VH() { + return constants$30.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); + * } + */ + public static MemorySegment poll$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$30.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); + * } + */ + public static void poll$set(MemorySegment seg, MemorySegment x) { + constants$30.const$1.set(seg, x); + } + public static MemorySegment poll$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$30.const$1.get(seg.asSlice(index*sizeof())); + } + public static void poll$set(MemorySegment seg, long index, MemorySegment x) { + constants$30.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static poll poll(MemorySegment segment, Arena scope) { + return poll.ofAddress(poll$get(segment), scope); + } + /** + * {@snippet : + * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); + * } + */ + public interface write_buf { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, java.lang.foreign.MemorySegment _x3); + static MemorySegment allocate(write_buf fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$30.const$3, fi, constants$30.const$2, scope); + } + static write_buf ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, java.lang.foreign.MemorySegment __x3) -> { + try { + return (int)constants$30.const$4.invokeExact(symbol, __x0, __x1, __x2, __x3); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle write_buf$VH() { + return constants$30.const$5; + } + /** + * Getter for field: + * {@snippet : + * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); + * } + */ + public static MemorySegment write_buf$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$30.const$5.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); + * } + */ + public static void write_buf$set(MemorySegment seg, MemorySegment x) { + constants$30.const$5.set(seg, x); + } + public static MemorySegment write_buf$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$30.const$5.get(seg.asSlice(index*sizeof())); + } + public static void write_buf$set(MemorySegment seg, long index, MemorySegment x) { + constants$30.const$5.set(seg.asSlice(index*sizeof()), x); + } + public static write_buf write_buf(MemorySegment segment, Arena scope) { + return write_buf.ofAddress(write_buf$get(segment), scope); + } + /** + * {@snippet : + * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public interface read_buf { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); + static MemorySegment allocate(read_buf fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$31.const$0, fi, constants$20.const$0, scope); + } + static read_buf ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { + try { + return (int)constants$20.const$2.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle read_buf$VH() { + return constants$31.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public static MemorySegment read_buf$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$31.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); + * } + */ + public static void read_buf$set(MemorySegment seg, MemorySegment x) { + constants$31.const$1.set(seg, x); + } + public static MemorySegment read_buf$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$31.const$1.get(seg.asSlice(index*sizeof())); + } + public static void read_buf$set(MemorySegment seg, long index, MemorySegment x) { + constants$31.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static read_buf read_buf(MemorySegment segment, Arena scope) { + return read_buf.ofAddress(read_buf$get(segment), scope); + } + /** + * {@snippet : + * int (*flock)(char*,struct fuse3_file_info*,int); + * } + */ + public interface flock { + + int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, int _x2); + static MemorySegment allocate(flock fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$31.const$2, fi, constants$16.const$4, scope); + } + static flock ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, int __x2) -> { + try { + return (int)constants$17.const$0.invokeExact(symbol, __x0, __x1, __x2); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle flock$VH() { + return constants$31.const$3; + } + /** + * Getter for field: + * {@snippet : + * int (*flock)(char*,struct fuse3_file_info*,int); + * } + */ + public static MemorySegment flock$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$31.const$3.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*flock)(char*,struct fuse3_file_info*,int); + * } + */ + public static void flock$set(MemorySegment seg, MemorySegment x) { + constants$31.const$3.set(seg, x); + } + public static MemorySegment flock$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$31.const$3.get(seg.asSlice(index*sizeof())); + } + public static void flock$set(MemorySegment seg, long index, MemorySegment x) { + constants$31.const$3.set(seg.asSlice(index*sizeof()), x); + } + public static flock flock(MemorySegment segment, Arena scope) { + return flock.ofAddress(flock$get(segment), scope); + } + /** + * {@snippet : + * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); + * } + */ + public interface fallocate { + + int apply(java.lang.foreign.MemorySegment _x0, int _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); + static MemorySegment allocate(fallocate fi, Arena scope) { + return RuntimeHelper.upcallStub(constants$31.const$5, fi, constants$31.const$4, scope); + } + static fallocate ofAddress(MemorySegment addr, Arena arena) { + MemorySegment symbol = addr.reinterpret(arena, null); + return (java.lang.foreign.MemorySegment __x0, int __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { + try { + return (int)constants$32.const$0.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + }; + } + } + + public static VarHandle fallocate$VH() { + return constants$32.const$1; + } + /** + * Getter for field: + * {@snippet : + * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); + * } + */ + public static MemorySegment fallocate$get(MemorySegment seg) { + return (java.lang.foreign.MemorySegment)constants$32.const$1.get(seg); + } + /** + * Setter for field: + * {@snippet : + * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); + * } + */ + public static void fallocate$set(MemorySegment seg, MemorySegment x) { + constants$32.const$1.set(seg, x); + } + public static MemorySegment fallocate$get(MemorySegment seg, long index) { + return (java.lang.foreign.MemorySegment)constants$32.const$1.get(seg.asSlice(index*sizeof())); + } + public static void fallocate$set(MemorySegment seg, long index, MemorySegment x) { + constants$32.const$1.set(seg.asSlice(index*sizeof()), x); + } + public static fallocate fallocate(MemorySegment segment, Arena scope) { + return fallocate.ofAddress(fallocate$get(segment), scope); + } + public static long sizeof() { return $LAYOUT().byteSize(); } + public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } + public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { + return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); + } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } +} + + diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_h.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_h.java similarity index 74% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_h.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_h.java index 9c6a494f..b30494fc 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_h.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_h.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -9,16 +9,16 @@ import static java.lang.foreign.ValueLayout.*; public class fuse_h { - public static final OfByte C_CHAR = Constants$root.C_CHAR$LAYOUT; - public static final OfShort C_SHORT = Constants$root.C_SHORT$LAYOUT; - public static final OfInt C_INT = Constants$root.C_LONG$LAYOUT; - public static final OfInt C_LONG = Constants$root.C_LONG$LAYOUT; - public static final OfLong C_LONG_LONG = Constants$root.C_LONG_LONG$LAYOUT; - public static final OfFloat C_FLOAT = Constants$root.C_FLOAT$LAYOUT; - public static final OfDouble C_DOUBLE = Constants$root.C_DOUBLE$LAYOUT; - public static final OfAddress C_POINTER = Constants$root.C_POINTER$LAYOUT; + public static final OfByte C_CHAR = JAVA_BYTE; + public static final OfShort C_SHORT = JAVA_SHORT; + public static final OfInt C_INT = JAVA_INT; + public static final OfInt C_LONG = JAVA_INT; + public static final OfLong C_LONG_LONG = JAVA_LONG; + public static final OfFloat C_FLOAT = JAVA_FLOAT; + public static final OfDouble C_DOUBLE = JAVA_DOUBLE; + public static final AddressLayout C_POINTER = RuntimeHelper.POINTER; public static MethodHandle fuse3_lib_help$MH() { - return RuntimeHelper.requireNonNull(constants$0.fuse3_lib_help$MH,"fuse3_lib_help"); + return RuntimeHelper.requireNonNull(constants$32.const$2,"fuse3_lib_help"); } /** * {@snippet : @@ -34,7 +34,7 @@ public static void fuse3_lib_help(MemorySegment args) { } } public static MethodHandle fuse3_new$MH() { - return RuntimeHelper.requireNonNull(constants$0.fuse3_new$MH,"fuse3_new"); + return RuntimeHelper.requireNonNull(constants$32.const$4,"fuse3_new"); } /** * {@snippet : @@ -50,7 +50,7 @@ public static MemorySegment fuse3_new(MemorySegment args, MemorySegment ops, lon } } public static MethodHandle fuse3_destroy$MH() { - return RuntimeHelper.requireNonNull(constants$0.fuse3_destroy$MH,"fuse3_destroy"); + return RuntimeHelper.requireNonNull(constants$32.const$5,"fuse3_destroy"); } /** * {@snippet : @@ -66,7 +66,7 @@ public static void fuse3_destroy(MemorySegment f) { } } public static MethodHandle fuse3_mount$MH() { - return RuntimeHelper.requireNonNull(constants$0.fuse3_mount$MH,"fuse3_mount"); + return RuntimeHelper.requireNonNull(constants$33.const$0,"fuse3_mount"); } /** * {@snippet : @@ -82,7 +82,7 @@ public static int fuse3_mount(MemorySegment f, MemorySegment mountpoint) { } } public static MethodHandle fuse3_unmount$MH() { - return RuntimeHelper.requireNonNull(constants$1.fuse3_unmount$MH,"fuse3_unmount"); + return RuntimeHelper.requireNonNull(constants$33.const$1,"fuse3_unmount"); } /** * {@snippet : @@ -98,7 +98,7 @@ public static void fuse3_unmount(MemorySegment f) { } } public static MethodHandle fuse3_loop$MH() { - return RuntimeHelper.requireNonNull(constants$1.fuse3_loop$MH,"fuse3_loop"); + return RuntimeHelper.requireNonNull(constants$33.const$2,"fuse3_loop"); } /** * {@snippet : @@ -114,7 +114,7 @@ public static int fuse3_loop(MemorySegment f) { } } public static MethodHandle fuse3_loop_mt_31$MH() { - return RuntimeHelper.requireNonNull(constants$1.fuse3_loop_mt_31$MH,"fuse3_loop_mt_31"); + return RuntimeHelper.requireNonNull(constants$33.const$3,"fuse3_loop_mt_31"); } /** * {@snippet : @@ -130,7 +130,7 @@ public static int fuse3_loop_mt_31(MemorySegment f, int clone_fd) { } } public static MethodHandle fuse3_exit$MH() { - return RuntimeHelper.requireNonNull(constants$1.fuse3_exit$MH,"fuse3_exit"); + return RuntimeHelper.requireNonNull(constants$33.const$4,"fuse3_exit"); } /** * {@snippet : @@ -146,7 +146,7 @@ public static void fuse3_exit(MemorySegment f) { } } public static MethodHandle fuse3_get_session$MH() { - return RuntimeHelper.requireNonNull(constants$1.fuse3_get_session$MH,"fuse3_get_session"); + return RuntimeHelper.requireNonNull(constants$33.const$6,"fuse3_get_session"); } /** * {@snippet : diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_stat.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_stat.java similarity index 54% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_stat.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_stat.java index 67d2fe8d..8783e45c 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_stat.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_stat.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -29,44 +29,11 @@ */ public class fuse_stat { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG$LAYOUT.withName("st_dev"), - MemoryLayout.paddingLayout(32), - Constants$root.C_LONG_LONG$LAYOUT.withName("st_ino"), - Constants$root.C_LONG$LAYOUT.withName("st_mode"), - Constants$root.C_SHORT$LAYOUT.withName("st_nlink"), - MemoryLayout.paddingLayout(16), - Constants$root.C_LONG$LAYOUT.withName("st_uid"), - Constants$root.C_LONG$LAYOUT.withName("st_gid"), - Constants$root.C_LONG$LAYOUT.withName("st_rdev"), - MemoryLayout.paddingLayout(32), - Constants$root.C_LONG_LONG$LAYOUT.withName("st_size"), - MemoryLayout.structLayout( - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_sec"), - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_nsec") - ).withName("st_atim"), - MemoryLayout.structLayout( - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_sec"), - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_nsec") - ).withName("st_mtim"), - MemoryLayout.structLayout( - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_sec"), - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_nsec") - ).withName("st_ctim"), - Constants$root.C_LONG$LAYOUT.withName("st_blksize"), - MemoryLayout.paddingLayout(32), - Constants$root.C_LONG_LONG$LAYOUT.withName("st_blocks"), - MemoryLayout.structLayout( - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_sec"), - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_nsec") - ).withName("st_birthtim") - ).withName("fuse_stat"); public static MemoryLayout $LAYOUT() { - return fuse_stat.$struct$LAYOUT; + return constants$0.const$3; } - static final VarHandle st_dev$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_dev")); public static VarHandle st_dev$VH() { - return fuse_stat.st_dev$VH; + return constants$0.const$4; } /** * Getter for field: @@ -75,7 +42,7 @@ public class fuse_stat { * } */ public static int st_dev$get(MemorySegment seg) { - return (int)fuse_stat.st_dev$VH.get(seg); + return (int)constants$0.const$4.get(seg); } /** * Setter for field: @@ -84,17 +51,16 @@ public class fuse_stat { * } */ public static void st_dev$set(MemorySegment seg, int x) { - fuse_stat.st_dev$VH.set(seg, x); + constants$0.const$4.set(seg, x); } public static int st_dev$get(MemorySegment seg, long index) { - return (int)fuse_stat.st_dev$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$0.const$4.get(seg.asSlice(index*sizeof())); } public static void st_dev$set(MemorySegment seg, long index, int x) { - fuse_stat.st_dev$VH.set(seg.asSlice(index*sizeof()), x); + constants$0.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_ino$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_ino")); public static VarHandle st_ino$VH() { - return fuse_stat.st_ino$VH; + return constants$0.const$5; } /** * Getter for field: @@ -103,7 +69,7 @@ public class fuse_stat { * } */ public static long st_ino$get(MemorySegment seg) { - return (long)fuse_stat.st_ino$VH.get(seg); + return (long)constants$0.const$5.get(seg); } /** * Setter for field: @@ -112,17 +78,16 @@ public class fuse_stat { * } */ public static void st_ino$set(MemorySegment seg, long x) { - fuse_stat.st_ino$VH.set(seg, x); + constants$0.const$5.set(seg, x); } public static long st_ino$get(MemorySegment seg, long index) { - return (long)fuse_stat.st_ino$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$0.const$5.get(seg.asSlice(index*sizeof())); } public static void st_ino$set(MemorySegment seg, long index, long x) { - fuse_stat.st_ino$VH.set(seg.asSlice(index*sizeof()), x); + constants$0.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_mode$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_mode")); public static VarHandle st_mode$VH() { - return fuse_stat.st_mode$VH; + return constants$1.const$0; } /** * Getter for field: @@ -131,7 +96,7 @@ public class fuse_stat { * } */ public static int st_mode$get(MemorySegment seg) { - return (int)fuse_stat.st_mode$VH.get(seg); + return (int)constants$1.const$0.get(seg); } /** * Setter for field: @@ -140,17 +105,16 @@ public class fuse_stat { * } */ public static void st_mode$set(MemorySegment seg, int x) { - fuse_stat.st_mode$VH.set(seg, x); + constants$1.const$0.set(seg, x); } public static int st_mode$get(MemorySegment seg, long index) { - return (int)fuse_stat.st_mode$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$1.const$0.get(seg.asSlice(index*sizeof())); } public static void st_mode$set(MemorySegment seg, long index, int x) { - fuse_stat.st_mode$VH.set(seg.asSlice(index*sizeof()), x); + constants$1.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_nlink$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_nlink")); public static VarHandle st_nlink$VH() { - return fuse_stat.st_nlink$VH; + return constants$1.const$1; } /** * Getter for field: @@ -159,7 +123,7 @@ public class fuse_stat { * } */ public static short st_nlink$get(MemorySegment seg) { - return (short)fuse_stat.st_nlink$VH.get(seg); + return (short)constants$1.const$1.get(seg); } /** * Setter for field: @@ -168,17 +132,16 @@ public class fuse_stat { * } */ public static void st_nlink$set(MemorySegment seg, short x) { - fuse_stat.st_nlink$VH.set(seg, x); + constants$1.const$1.set(seg, x); } public static short st_nlink$get(MemorySegment seg, long index) { - return (short)fuse_stat.st_nlink$VH.get(seg.asSlice(index*sizeof())); + return (short)constants$1.const$1.get(seg.asSlice(index*sizeof())); } public static void st_nlink$set(MemorySegment seg, long index, short x) { - fuse_stat.st_nlink$VH.set(seg.asSlice(index*sizeof()), x); + constants$1.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_uid$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_uid")); public static VarHandle st_uid$VH() { - return fuse_stat.st_uid$VH; + return constants$1.const$2; } /** * Getter for field: @@ -187,7 +150,7 @@ public class fuse_stat { * } */ public static int st_uid$get(MemorySegment seg) { - return (int)fuse_stat.st_uid$VH.get(seg); + return (int)constants$1.const$2.get(seg); } /** * Setter for field: @@ -196,17 +159,16 @@ public class fuse_stat { * } */ public static void st_uid$set(MemorySegment seg, int x) { - fuse_stat.st_uid$VH.set(seg, x); + constants$1.const$2.set(seg, x); } public static int st_uid$get(MemorySegment seg, long index) { - return (int)fuse_stat.st_uid$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$1.const$2.get(seg.asSlice(index*sizeof())); } public static void st_uid$set(MemorySegment seg, long index, int x) { - fuse_stat.st_uid$VH.set(seg.asSlice(index*sizeof()), x); + constants$1.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_gid$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_gid")); public static VarHandle st_gid$VH() { - return fuse_stat.st_gid$VH; + return constants$1.const$3; } /** * Getter for field: @@ -215,7 +177,7 @@ public class fuse_stat { * } */ public static int st_gid$get(MemorySegment seg) { - return (int)fuse_stat.st_gid$VH.get(seg); + return (int)constants$1.const$3.get(seg); } /** * Setter for field: @@ -224,17 +186,16 @@ public class fuse_stat { * } */ public static void st_gid$set(MemorySegment seg, int x) { - fuse_stat.st_gid$VH.set(seg, x); + constants$1.const$3.set(seg, x); } public static int st_gid$get(MemorySegment seg, long index) { - return (int)fuse_stat.st_gid$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$1.const$3.get(seg.asSlice(index*sizeof())); } public static void st_gid$set(MemorySegment seg, long index, int x) { - fuse_stat.st_gid$VH.set(seg.asSlice(index*sizeof()), x); + constants$1.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_rdev$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_rdev")); public static VarHandle st_rdev$VH() { - return fuse_stat.st_rdev$VH; + return constants$1.const$4; } /** * Getter for field: @@ -243,7 +204,7 @@ public class fuse_stat { * } */ public static int st_rdev$get(MemorySegment seg) { - return (int)fuse_stat.st_rdev$VH.get(seg); + return (int)constants$1.const$4.get(seg); } /** * Setter for field: @@ -252,17 +213,16 @@ public class fuse_stat { * } */ public static void st_rdev$set(MemorySegment seg, int x) { - fuse_stat.st_rdev$VH.set(seg, x); + constants$1.const$4.set(seg, x); } public static int st_rdev$get(MemorySegment seg, long index) { - return (int)fuse_stat.st_rdev$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$1.const$4.get(seg.asSlice(index*sizeof())); } public static void st_rdev$set(MemorySegment seg, long index, int x) { - fuse_stat.st_rdev$VH.set(seg.asSlice(index*sizeof()), x); + constants$1.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_size$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_size")); public static VarHandle st_size$VH() { - return fuse_stat.st_size$VH; + return constants$1.const$5; } /** * Getter for field: @@ -271,7 +231,7 @@ public class fuse_stat { * } */ public static long st_size$get(MemorySegment seg) { - return (long)fuse_stat.st_size$VH.get(seg); + return (long)constants$1.const$5.get(seg); } /** * Setter for field: @@ -280,13 +240,13 @@ public class fuse_stat { * } */ public static void st_size$set(MemorySegment seg, long x) { - fuse_stat.st_size$VH.set(seg, x); + constants$1.const$5.set(seg, x); } public static long st_size$get(MemorySegment seg, long index) { - return (long)fuse_stat.st_size$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$1.const$5.get(seg.asSlice(index*sizeof())); } public static void st_size$set(MemorySegment seg, long index, long x) { - fuse_stat.st_size$VH.set(seg.asSlice(index*sizeof()), x); + constants$1.const$5.set(seg.asSlice(index*sizeof()), x); } public static MemorySegment st_atim$slice(MemorySegment seg) { return seg.asSlice(48, 16); @@ -297,9 +257,8 @@ public class fuse_stat { public static MemorySegment st_ctim$slice(MemorySegment seg) { return seg.asSlice(80, 16); } - static final VarHandle st_blksize$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_blksize")); public static VarHandle st_blksize$VH() { - return fuse_stat.st_blksize$VH; + return constants$2.const$0; } /** * Getter for field: @@ -308,7 +267,7 @@ public class fuse_stat { * } */ public static int st_blksize$get(MemorySegment seg) { - return (int)fuse_stat.st_blksize$VH.get(seg); + return (int)constants$2.const$0.get(seg); } /** * Setter for field: @@ -317,17 +276,16 @@ public class fuse_stat { * } */ public static void st_blksize$set(MemorySegment seg, int x) { - fuse_stat.st_blksize$VH.set(seg, x); + constants$2.const$0.set(seg, x); } public static int st_blksize$get(MemorySegment seg, long index) { - return (int)fuse_stat.st_blksize$VH.get(seg.asSlice(index*sizeof())); + return (int)constants$2.const$0.get(seg.asSlice(index*sizeof())); } public static void st_blksize$set(MemorySegment seg, long index, int x) { - fuse_stat.st_blksize$VH.set(seg.asSlice(index*sizeof()), x); + constants$2.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle st_blocks$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("st_blocks")); public static VarHandle st_blocks$VH() { - return fuse_stat.st_blocks$VH; + return constants$2.const$1; } /** * Getter for field: @@ -336,7 +294,7 @@ public class fuse_stat { * } */ public static long st_blocks$get(MemorySegment seg) { - return (long)fuse_stat.st_blocks$VH.get(seg); + return (long)constants$2.const$1.get(seg); } /** * Setter for field: @@ -345,13 +303,13 @@ public class fuse_stat { * } */ public static void st_blocks$set(MemorySegment seg, long x) { - fuse_stat.st_blocks$VH.set(seg, x); + constants$2.const$1.set(seg, x); } public static long st_blocks$get(MemorySegment seg, long index) { - return (long)fuse_stat.st_blocks$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$2.const$1.get(seg.asSlice(index*sizeof())); } public static void st_blocks$set(MemorySegment seg, long index, long x) { - fuse_stat.st_blocks$VH.set(seg.asSlice(index*sizeof()), x); + constants$2.const$1.set(seg.asSlice(index*sizeof()), x); } public static MemorySegment st_birthtim$slice(MemorySegment seg) { return seg.asSlice(112, 16); @@ -361,7 +319,7 @@ public class fuse_stat { public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_statvfs.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_statvfs.java similarity index 56% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_statvfs.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_statvfs.java index e37abd45..f000f68b 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_statvfs.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_statvfs.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -26,25 +26,11 @@ */ public class fuse_statvfs { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG_LONG$LAYOUT.withName("f_bsize"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_frsize"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_blocks"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_bfree"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_bavail"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_files"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_ffree"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_favail"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_fsid"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_flag"), - Constants$root.C_LONG_LONG$LAYOUT.withName("f_namemax") - ).withName("fuse_statvfs"); public static MemoryLayout $LAYOUT() { - return fuse_statvfs.$struct$LAYOUT; + return constants$2.const$2; } - static final VarHandle f_bsize$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_bsize")); public static VarHandle f_bsize$VH() { - return fuse_statvfs.f_bsize$VH; + return constants$2.const$3; } /** * Getter for field: @@ -53,7 +39,7 @@ public class fuse_statvfs { * } */ public static long f_bsize$get(MemorySegment seg) { - return (long)fuse_statvfs.f_bsize$VH.get(seg); + return (long)constants$2.const$3.get(seg); } /** * Setter for field: @@ -62,17 +48,16 @@ public class fuse_statvfs { * } */ public static void f_bsize$set(MemorySegment seg, long x) { - fuse_statvfs.f_bsize$VH.set(seg, x); + constants$2.const$3.set(seg, x); } public static long f_bsize$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_bsize$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$2.const$3.get(seg.asSlice(index*sizeof())); } public static void f_bsize$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_bsize$VH.set(seg.asSlice(index*sizeof()), x); + constants$2.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_frsize$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_frsize")); public static VarHandle f_frsize$VH() { - return fuse_statvfs.f_frsize$VH; + return constants$2.const$4; } /** * Getter for field: @@ -81,7 +66,7 @@ public class fuse_statvfs { * } */ public static long f_frsize$get(MemorySegment seg) { - return (long)fuse_statvfs.f_frsize$VH.get(seg); + return (long)constants$2.const$4.get(seg); } /** * Setter for field: @@ -90,17 +75,16 @@ public class fuse_statvfs { * } */ public static void f_frsize$set(MemorySegment seg, long x) { - fuse_statvfs.f_frsize$VH.set(seg, x); + constants$2.const$4.set(seg, x); } public static long f_frsize$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_frsize$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$2.const$4.get(seg.asSlice(index*sizeof())); } public static void f_frsize$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_frsize$VH.set(seg.asSlice(index*sizeof()), x); + constants$2.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_blocks$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_blocks")); public static VarHandle f_blocks$VH() { - return fuse_statvfs.f_blocks$VH; + return constants$2.const$5; } /** * Getter for field: @@ -109,7 +93,7 @@ public class fuse_statvfs { * } */ public static long f_blocks$get(MemorySegment seg) { - return (long)fuse_statvfs.f_blocks$VH.get(seg); + return (long)constants$2.const$5.get(seg); } /** * Setter for field: @@ -118,17 +102,16 @@ public class fuse_statvfs { * } */ public static void f_blocks$set(MemorySegment seg, long x) { - fuse_statvfs.f_blocks$VH.set(seg, x); + constants$2.const$5.set(seg, x); } public static long f_blocks$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_blocks$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$2.const$5.get(seg.asSlice(index*sizeof())); } public static void f_blocks$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_blocks$VH.set(seg.asSlice(index*sizeof()), x); + constants$2.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_bfree$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_bfree")); public static VarHandle f_bfree$VH() { - return fuse_statvfs.f_bfree$VH; + return constants$3.const$0; } /** * Getter for field: @@ -137,7 +120,7 @@ public class fuse_statvfs { * } */ public static long f_bfree$get(MemorySegment seg) { - return (long)fuse_statvfs.f_bfree$VH.get(seg); + return (long)constants$3.const$0.get(seg); } /** * Setter for field: @@ -146,17 +129,16 @@ public class fuse_statvfs { * } */ public static void f_bfree$set(MemorySegment seg, long x) { - fuse_statvfs.f_bfree$VH.set(seg, x); + constants$3.const$0.set(seg, x); } public static long f_bfree$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_bfree$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$3.const$0.get(seg.asSlice(index*sizeof())); } public static void f_bfree$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_bfree$VH.set(seg.asSlice(index*sizeof()), x); + constants$3.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_bavail$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_bavail")); public static VarHandle f_bavail$VH() { - return fuse_statvfs.f_bavail$VH; + return constants$3.const$1; } /** * Getter for field: @@ -165,7 +147,7 @@ public class fuse_statvfs { * } */ public static long f_bavail$get(MemorySegment seg) { - return (long)fuse_statvfs.f_bavail$VH.get(seg); + return (long)constants$3.const$1.get(seg); } /** * Setter for field: @@ -174,17 +156,16 @@ public class fuse_statvfs { * } */ public static void f_bavail$set(MemorySegment seg, long x) { - fuse_statvfs.f_bavail$VH.set(seg, x); + constants$3.const$1.set(seg, x); } public static long f_bavail$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_bavail$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$3.const$1.get(seg.asSlice(index*sizeof())); } public static void f_bavail$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_bavail$VH.set(seg.asSlice(index*sizeof()), x); + constants$3.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_files$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_files")); public static VarHandle f_files$VH() { - return fuse_statvfs.f_files$VH; + return constants$3.const$2; } /** * Getter for field: @@ -193,7 +174,7 @@ public class fuse_statvfs { * } */ public static long f_files$get(MemorySegment seg) { - return (long)fuse_statvfs.f_files$VH.get(seg); + return (long)constants$3.const$2.get(seg); } /** * Setter for field: @@ -202,17 +183,16 @@ public class fuse_statvfs { * } */ public static void f_files$set(MemorySegment seg, long x) { - fuse_statvfs.f_files$VH.set(seg, x); + constants$3.const$2.set(seg, x); } public static long f_files$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_files$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$3.const$2.get(seg.asSlice(index*sizeof())); } public static void f_files$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_files$VH.set(seg.asSlice(index*sizeof()), x); + constants$3.const$2.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_ffree$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_ffree")); public static VarHandle f_ffree$VH() { - return fuse_statvfs.f_ffree$VH; + return constants$3.const$3; } /** * Getter for field: @@ -221,7 +201,7 @@ public class fuse_statvfs { * } */ public static long f_ffree$get(MemorySegment seg) { - return (long)fuse_statvfs.f_ffree$VH.get(seg); + return (long)constants$3.const$3.get(seg); } /** * Setter for field: @@ -230,17 +210,16 @@ public class fuse_statvfs { * } */ public static void f_ffree$set(MemorySegment seg, long x) { - fuse_statvfs.f_ffree$VH.set(seg, x); + constants$3.const$3.set(seg, x); } public static long f_ffree$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_ffree$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$3.const$3.get(seg.asSlice(index*sizeof())); } public static void f_ffree$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_ffree$VH.set(seg.asSlice(index*sizeof()), x); + constants$3.const$3.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_favail$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_favail")); public static VarHandle f_favail$VH() { - return fuse_statvfs.f_favail$VH; + return constants$3.const$4; } /** * Getter for field: @@ -249,7 +228,7 @@ public class fuse_statvfs { * } */ public static long f_favail$get(MemorySegment seg) { - return (long)fuse_statvfs.f_favail$VH.get(seg); + return (long)constants$3.const$4.get(seg); } /** * Setter for field: @@ -258,17 +237,16 @@ public class fuse_statvfs { * } */ public static void f_favail$set(MemorySegment seg, long x) { - fuse_statvfs.f_favail$VH.set(seg, x); + constants$3.const$4.set(seg, x); } public static long f_favail$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_favail$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$3.const$4.get(seg.asSlice(index*sizeof())); } public static void f_favail$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_favail$VH.set(seg.asSlice(index*sizeof()), x); + constants$3.const$4.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_fsid$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_fsid")); public static VarHandle f_fsid$VH() { - return fuse_statvfs.f_fsid$VH; + return constants$3.const$5; } /** * Getter for field: @@ -277,7 +255,7 @@ public class fuse_statvfs { * } */ public static long f_fsid$get(MemorySegment seg) { - return (long)fuse_statvfs.f_fsid$VH.get(seg); + return (long)constants$3.const$5.get(seg); } /** * Setter for field: @@ -286,17 +264,16 @@ public class fuse_statvfs { * } */ public static void f_fsid$set(MemorySegment seg, long x) { - fuse_statvfs.f_fsid$VH.set(seg, x); + constants$3.const$5.set(seg, x); } public static long f_fsid$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_fsid$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$3.const$5.get(seg.asSlice(index*sizeof())); } public static void f_fsid$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_fsid$VH.set(seg.asSlice(index*sizeof()), x); + constants$3.const$5.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_flag$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_flag")); public static VarHandle f_flag$VH() { - return fuse_statvfs.f_flag$VH; + return constants$4.const$0; } /** * Getter for field: @@ -305,7 +282,7 @@ public class fuse_statvfs { * } */ public static long f_flag$get(MemorySegment seg) { - return (long)fuse_statvfs.f_flag$VH.get(seg); + return (long)constants$4.const$0.get(seg); } /** * Setter for field: @@ -314,17 +291,16 @@ public class fuse_statvfs { * } */ public static void f_flag$set(MemorySegment seg, long x) { - fuse_statvfs.f_flag$VH.set(seg, x); + constants$4.const$0.set(seg, x); } public static long f_flag$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_flag$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$4.const$0.get(seg.asSlice(index*sizeof())); } public static void f_flag$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_flag$VH.set(seg.asSlice(index*sizeof()), x); + constants$4.const$0.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle f_namemax$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("f_namemax")); public static VarHandle f_namemax$VH() { - return fuse_statvfs.f_namemax$VH; + return constants$4.const$1; } /** * Getter for field: @@ -333,7 +309,7 @@ public class fuse_statvfs { * } */ public static long f_namemax$get(MemorySegment seg) { - return (long)fuse_statvfs.f_namemax$VH.get(seg); + return (long)constants$4.const$1.get(seg); } /** * Setter for field: @@ -342,20 +318,20 @@ public class fuse_statvfs { * } */ public static void f_namemax$set(MemorySegment seg, long x) { - fuse_statvfs.f_namemax$VH.set(seg, x); + constants$4.const$1.set(seg, x); } public static long f_namemax$get(MemorySegment seg, long index) { - return (long)fuse_statvfs.f_namemax$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$4.const$1.get(seg.asSlice(index*sizeof())); } public static void f_namemax$set(MemorySegment seg, long index, long x) { - fuse_statvfs.f_namemax$VH.set(seg.asSlice(index*sizeof()), x); + constants$4.const$1.set(seg.asSlice(index*sizeof()), x); } public static long sizeof() { return $LAYOUT().byteSize(); } public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_timespec.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_timespec.java similarity index 58% rename from jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_timespec.java rename to jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_timespec.java index 2b45632a..ea210491 100644 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse_timespec.java +++ b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3/fuse_timespec.java @@ -1,6 +1,6 @@ // Generated by jextract -package org.cryptomator.jfuse.win.extr; +package org.cryptomator.jfuse.win.extr.fuse3; import java.lang.invoke.MethodHandle; import java.lang.invoke.VarHandle; @@ -17,16 +17,11 @@ */ public class fuse_timespec { - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_sec"), - Constants$root.C_LONG_LONG$LAYOUT.withName("tv_nsec") - ).withName("fuse_timespec"); public static MemoryLayout $LAYOUT() { - return fuse_timespec.$struct$LAYOUT; + return constants$0.const$0; } - static final VarHandle tv_sec$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("tv_sec")); public static VarHandle tv_sec$VH() { - return fuse_timespec.tv_sec$VH; + return constants$0.const$1; } /** * Getter for field: @@ -35,7 +30,7 @@ public class fuse_timespec { * } */ public static long tv_sec$get(MemorySegment seg) { - return (long)fuse_timespec.tv_sec$VH.get(seg); + return (long)constants$0.const$1.get(seg); } /** * Setter for field: @@ -44,17 +39,16 @@ public class fuse_timespec { * } */ public static void tv_sec$set(MemorySegment seg, long x) { - fuse_timespec.tv_sec$VH.set(seg, x); + constants$0.const$1.set(seg, x); } public static long tv_sec$get(MemorySegment seg, long index) { - return (long)fuse_timespec.tv_sec$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$0.const$1.get(seg.asSlice(index*sizeof())); } public static void tv_sec$set(MemorySegment seg, long index, long x) { - fuse_timespec.tv_sec$VH.set(seg.asSlice(index*sizeof()), x); + constants$0.const$1.set(seg.asSlice(index*sizeof()), x); } - static final VarHandle tv_nsec$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("tv_nsec")); public static VarHandle tv_nsec$VH() { - return fuse_timespec.tv_nsec$VH; + return constants$0.const$2; } /** * Getter for field: @@ -63,7 +57,7 @@ public class fuse_timespec { * } */ public static long tv_nsec$get(MemorySegment seg) { - return (long)fuse_timespec.tv_nsec$VH.get(seg); + return (long)constants$0.const$2.get(seg); } /** * Setter for field: @@ -72,20 +66,20 @@ public class fuse_timespec { * } */ public static void tv_nsec$set(MemorySegment seg, long x) { - fuse_timespec.tv_nsec$VH.set(seg, x); + constants$0.const$2.set(seg, x); } public static long tv_nsec$get(MemorySegment seg, long index) { - return (long)fuse_timespec.tv_nsec$VH.get(seg.asSlice(index*sizeof())); + return (long)constants$0.const$2.get(seg.asSlice(index*sizeof())); } public static void tv_nsec$set(MemorySegment seg, long index, long x) { - fuse_timespec.tv_nsec$VH.set(seg.asSlice(index*sizeof()), x); + constants$0.const$2.set(seg.asSlice(index*sizeof()), x); } public static long sizeof() { return $LAYOUT().byteSize(); } public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } + public static MemorySegment ofAddress(MemorySegment addr, Arena scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } } diff --git a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_operations.java b/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_operations.java deleted file mode 100644 index 5b52d508..00000000 --- a/jfuse-win/src/main/java/org/cryptomator/jfuse/win/extr/fuse3_operations.java +++ /dev/null @@ -1,2594 +0,0 @@ -// Generated by jextract - -package org.cryptomator.jfuse.win.extr; - -import java.lang.invoke.MethodHandle; -import java.lang.invoke.VarHandle; -import java.nio.ByteOrder; -import java.lang.foreign.*; -import static java.lang.foreign.ValueLayout.*; -/** - * {@snippet : - * struct fuse3_operations { - * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); - * int (*readlink)(char*,char*,unsigned long long); - * int (*mknod)(char*,unsigned int,unsigned int); - * int (*mkdir)(char*,unsigned int); - * int (*unlink)(char*); - * int (*rmdir)(char*); - * int (*symlink)(char*,char*); - * int (*rename)(char*,char*,unsigned int); - * int (*link)(char*,char*); - * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); - * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); - * int (*truncate)(char*,long long,struct fuse3_file_info*); - * int (*open)(char*,struct fuse3_file_info*); - * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * int (*statfs)(char*,struct fuse_statvfs*); - * int (*flush)(char*,struct fuse3_file_info*); - * int (*release)(char*,struct fuse3_file_info*); - * int (*fsync)(char*,int,struct fuse3_file_info*); - * int (*setxattr)(char*,char*,char*,unsigned long long,int); - * int (*getxattr)(char*,char*,char*,unsigned long long); - * int (*listxattr)(char*,char*,unsigned long long); - * int (*removexattr)(char*,char*); - * int (*opendir)(char*,struct fuse3_file_info*); - * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); - * int (*releasedir)(char*,struct fuse3_file_info*); - * int (*fsyncdir)(char*,int,struct fuse3_file_info*); - * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); - * void (*destroy)(void*); - * int (*access)(char*,int); - * int (*create)(char*,unsigned int,struct fuse3_file_info*); - * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); - * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); - * int (*bmap)(char*,unsigned long long,unsigned long long*); - * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); - * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); - * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); - * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); - * int (*flock)(char*,struct fuse3_file_info*,int); - * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); - * }; - * } - */ -public class fuse3_operations { - - static final StructLayout $struct$LAYOUT = MemoryLayout.structLayout( - Constants$root.C_POINTER$LAYOUT.withName("getattr"), - Constants$root.C_POINTER$LAYOUT.withName("readlink"), - Constants$root.C_POINTER$LAYOUT.withName("mknod"), - Constants$root.C_POINTER$LAYOUT.withName("mkdir"), - Constants$root.C_POINTER$LAYOUT.withName("unlink"), - Constants$root.C_POINTER$LAYOUT.withName("rmdir"), - Constants$root.C_POINTER$LAYOUT.withName("symlink"), - Constants$root.C_POINTER$LAYOUT.withName("rename"), - Constants$root.C_POINTER$LAYOUT.withName("link"), - Constants$root.C_POINTER$LAYOUT.withName("chmod"), - Constants$root.C_POINTER$LAYOUT.withName("chown"), - Constants$root.C_POINTER$LAYOUT.withName("truncate"), - Constants$root.C_POINTER$LAYOUT.withName("open"), - Constants$root.C_POINTER$LAYOUT.withName("read"), - Constants$root.C_POINTER$LAYOUT.withName("write"), - Constants$root.C_POINTER$LAYOUT.withName("statfs"), - Constants$root.C_POINTER$LAYOUT.withName("flush"), - Constants$root.C_POINTER$LAYOUT.withName("release"), - Constants$root.C_POINTER$LAYOUT.withName("fsync"), - Constants$root.C_POINTER$LAYOUT.withName("setxattr"), - Constants$root.C_POINTER$LAYOUT.withName("getxattr"), - Constants$root.C_POINTER$LAYOUT.withName("listxattr"), - Constants$root.C_POINTER$LAYOUT.withName("removexattr"), - Constants$root.C_POINTER$LAYOUT.withName("opendir"), - Constants$root.C_POINTER$LAYOUT.withName("readdir"), - Constants$root.C_POINTER$LAYOUT.withName("releasedir"), - Constants$root.C_POINTER$LAYOUT.withName("fsyncdir"), - Constants$root.C_POINTER$LAYOUT.withName("init"), - Constants$root.C_POINTER$LAYOUT.withName("destroy"), - Constants$root.C_POINTER$LAYOUT.withName("access"), - Constants$root.C_POINTER$LAYOUT.withName("create"), - Constants$root.C_POINTER$LAYOUT.withName("lock"), - Constants$root.C_POINTER$LAYOUT.withName("utimens"), - Constants$root.C_POINTER$LAYOUT.withName("bmap"), - Constants$root.C_POINTER$LAYOUT.withName("ioctl"), - Constants$root.C_POINTER$LAYOUT.withName("poll"), - Constants$root.C_POINTER$LAYOUT.withName("write_buf"), - Constants$root.C_POINTER$LAYOUT.withName("read_buf"), - Constants$root.C_POINTER$LAYOUT.withName("flock"), - Constants$root.C_POINTER$LAYOUT.withName("fallocate") - ).withName("fuse3_operations"); - public static MemoryLayout $LAYOUT() { - return fuse3_operations.$struct$LAYOUT; - } - static final FunctionDescriptor getattr$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle getattr$MH = RuntimeHelper.downcallHandle( - fuse3_operations.getattr$FUNC - ); - /** - * {@snippet : - * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); - * } - */ - public interface getattr { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(getattr fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(getattr.class, fi, fuse3_operations.getattr$FUNC, scope); - } - static getattr ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.getattr$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle getattr$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("getattr")); - public static VarHandle getattr$VH() { - return fuse3_operations.getattr$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); - * } - */ - public static MemorySegment getattr$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.getattr$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*getattr)(char*,struct fuse_stat*,struct fuse3_file_info*); - * } - */ - public static void getattr$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.getattr$VH.set(seg, x); - } - public static MemorySegment getattr$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.getattr$VH.get(seg.asSlice(index*sizeof())); - } - public static void getattr$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.getattr$VH.set(seg.asSlice(index*sizeof()), x); - } - public static getattr getattr(MemorySegment segment, SegmentScope scope) { - return getattr.ofAddress(getattr$get(segment), scope); - } - static final FunctionDescriptor readlink$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT - ); - static final MethodHandle readlink$MH = RuntimeHelper.downcallHandle( - fuse3_operations.readlink$FUNC - ); - /** - * {@snippet : - * int (*readlink)(char*,char*,unsigned long long); - * } - */ - public interface readlink { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2); - static MemorySegment allocate(readlink fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(readlink.class, fi, fuse3_operations.readlink$FUNC, scope); - } - static readlink ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2) -> { - try { - return (int)fuse3_operations.readlink$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle readlink$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("readlink")); - public static VarHandle readlink$VH() { - return fuse3_operations.readlink$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*readlink)(char*,char*,unsigned long long); - * } - */ - public static MemorySegment readlink$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.readlink$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*readlink)(char*,char*,unsigned long long); - * } - */ - public static void readlink$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.readlink$VH.set(seg, x); - } - public static MemorySegment readlink$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.readlink$VH.get(seg.asSlice(index*sizeof())); - } - public static void readlink$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.readlink$VH.set(seg.asSlice(index*sizeof()), x); - } - public static readlink readlink(MemorySegment segment, SegmentScope scope) { - return readlink.ofAddress(readlink$get(segment), scope); - } - static final FunctionDescriptor mknod$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle mknod$MH = RuntimeHelper.downcallHandle( - fuse3_operations.mknod$FUNC - ); - /** - * {@snippet : - * int (*mknod)(char*,unsigned int,unsigned int); - * } - */ - public interface mknod { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, int _x2); - static MemorySegment allocate(mknod fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(mknod.class, fi, fuse3_operations.mknod$FUNC, scope); - } - static mknod ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2) -> { - try { - return (int)fuse3_operations.mknod$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle mknod$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("mknod")); - public static VarHandle mknod$VH() { - return fuse3_operations.mknod$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*mknod)(char*,unsigned int,unsigned int); - * } - */ - public static MemorySegment mknod$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.mknod$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*mknod)(char*,unsigned int,unsigned int); - * } - */ - public static void mknod$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.mknod$VH.set(seg, x); - } - public static MemorySegment mknod$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.mknod$VH.get(seg.asSlice(index*sizeof())); - } - public static void mknod$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.mknod$VH.set(seg.asSlice(index*sizeof()), x); - } - public static mknod mknod(MemorySegment segment, SegmentScope scope) { - return mknod.ofAddress(mknod$get(segment), scope); - } - static final FunctionDescriptor mkdir$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle mkdir$MH = RuntimeHelper.downcallHandle( - fuse3_operations.mkdir$FUNC - ); - /** - * {@snippet : - * int (*mkdir)(char*,unsigned int); - * } - */ - public interface mkdir { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1); - static MemorySegment allocate(mkdir fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(mkdir.class, fi, fuse3_operations.mkdir$FUNC, scope); - } - static mkdir ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1) -> { - try { - return (int)fuse3_operations.mkdir$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle mkdir$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("mkdir")); - public static VarHandle mkdir$VH() { - return fuse3_operations.mkdir$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*mkdir)(char*,unsigned int); - * } - */ - public static MemorySegment mkdir$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.mkdir$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*mkdir)(char*,unsigned int); - * } - */ - public static void mkdir$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.mkdir$VH.set(seg, x); - } - public static MemorySegment mkdir$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.mkdir$VH.get(seg.asSlice(index*sizeof())); - } - public static void mkdir$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.mkdir$VH.set(seg.asSlice(index*sizeof()), x); - } - public static mkdir mkdir(MemorySegment segment, SegmentScope scope) { - return mkdir.ofAddress(mkdir$get(segment), scope); - } - static final FunctionDescriptor unlink$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle unlink$MH = RuntimeHelper.downcallHandle( - fuse3_operations.unlink$FUNC - ); - /** - * {@snippet : - * int (*unlink)(char*); - * } - */ - public interface unlink { - - int apply(java.lang.foreign.MemorySegment _x0); - static MemorySegment allocate(unlink fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(unlink.class, fi, fuse3_operations.unlink$FUNC, scope); - } - static unlink ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0) -> { - try { - return (int)fuse3_operations.unlink$MH.invokeExact(symbol, __x0); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle unlink$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("unlink")); - public static VarHandle unlink$VH() { - return fuse3_operations.unlink$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*unlink)(char*); - * } - */ - public static MemorySegment unlink$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.unlink$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*unlink)(char*); - * } - */ - public static void unlink$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.unlink$VH.set(seg, x); - } - public static MemorySegment unlink$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.unlink$VH.get(seg.asSlice(index*sizeof())); - } - public static void unlink$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.unlink$VH.set(seg.asSlice(index*sizeof()), x); - } - public static unlink unlink(MemorySegment segment, SegmentScope scope) { - return unlink.ofAddress(unlink$get(segment), scope); - } - static final FunctionDescriptor rmdir$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle rmdir$MH = RuntimeHelper.downcallHandle( - fuse3_operations.rmdir$FUNC - ); - /** - * {@snippet : - * int (*rmdir)(char*); - * } - */ - public interface rmdir { - - int apply(java.lang.foreign.MemorySegment _x0); - static MemorySegment allocate(rmdir fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(rmdir.class, fi, fuse3_operations.rmdir$FUNC, scope); - } - static rmdir ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0) -> { - try { - return (int)fuse3_operations.rmdir$MH.invokeExact(symbol, __x0); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle rmdir$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("rmdir")); - public static VarHandle rmdir$VH() { - return fuse3_operations.rmdir$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*rmdir)(char*); - * } - */ - public static MemorySegment rmdir$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.rmdir$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*rmdir)(char*); - * } - */ - public static void rmdir$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.rmdir$VH.set(seg, x); - } - public static MemorySegment rmdir$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.rmdir$VH.get(seg.asSlice(index*sizeof())); - } - public static void rmdir$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.rmdir$VH.set(seg.asSlice(index*sizeof()), x); - } - public static rmdir rmdir(MemorySegment segment, SegmentScope scope) { - return rmdir.ofAddress(rmdir$get(segment), scope); - } - static final FunctionDescriptor symlink$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle symlink$MH = RuntimeHelper.downcallHandle( - fuse3_operations.symlink$FUNC - ); - /** - * {@snippet : - * int (*symlink)(char*,char*); - * } - */ - public interface symlink { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(symlink fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(symlink.class, fi, fuse3_operations.symlink$FUNC, scope); - } - static symlink ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.symlink$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle symlink$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("symlink")); - public static VarHandle symlink$VH() { - return fuse3_operations.symlink$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*symlink)(char*,char*); - * } - */ - public static MemorySegment symlink$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.symlink$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*symlink)(char*,char*); - * } - */ - public static void symlink$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.symlink$VH.set(seg, x); - } - public static MemorySegment symlink$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.symlink$VH.get(seg.asSlice(index*sizeof())); - } - public static void symlink$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.symlink$VH.set(seg.asSlice(index*sizeof()), x); - } - public static symlink symlink(MemorySegment segment, SegmentScope scope) { - return symlink.ofAddress(symlink$get(segment), scope); - } - static final FunctionDescriptor rename$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle rename$MH = RuntimeHelper.downcallHandle( - fuse3_operations.rename$FUNC - ); - /** - * {@snippet : - * int (*rename)(char*,char*,unsigned int); - * } - */ - public interface rename { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, int _x2); - static MemorySegment allocate(rename fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(rename.class, fi, fuse3_operations.rename$FUNC, scope); - } - static rename ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, int __x2) -> { - try { - return (int)fuse3_operations.rename$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle rename$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("rename")); - public static VarHandle rename$VH() { - return fuse3_operations.rename$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*rename)(char*,char*,unsigned int); - * } - */ - public static MemorySegment rename$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.rename$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*rename)(char*,char*,unsigned int); - * } - */ - public static void rename$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.rename$VH.set(seg, x); - } - public static MemorySegment rename$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.rename$VH.get(seg.asSlice(index*sizeof())); - } - public static void rename$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.rename$VH.set(seg.asSlice(index*sizeof()), x); - } - public static rename rename(MemorySegment segment, SegmentScope scope) { - return rename.ofAddress(rename$get(segment), scope); - } - static final FunctionDescriptor link$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle link$MH = RuntimeHelper.downcallHandle( - fuse3_operations.link$FUNC - ); - /** - * {@snippet : - * int (*link)(char*,char*); - * } - */ - public interface link { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(link fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(link.class, fi, fuse3_operations.link$FUNC, scope); - } - static link ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.link$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle link$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("link")); - public static VarHandle link$VH() { - return fuse3_operations.link$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*link)(char*,char*); - * } - */ - public static MemorySegment link$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.link$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*link)(char*,char*); - * } - */ - public static void link$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.link$VH.set(seg, x); - } - public static MemorySegment link$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.link$VH.get(seg.asSlice(index*sizeof())); - } - public static void link$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.link$VH.set(seg.asSlice(index*sizeof()), x); - } - public static link link(MemorySegment segment, SegmentScope scope) { - return link.ofAddress(link$get(segment), scope); - } - static final FunctionDescriptor chmod$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle chmod$MH = RuntimeHelper.downcallHandle( - fuse3_operations.chmod$FUNC - ); - /** - * {@snippet : - * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); - * } - */ - public interface chmod { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(chmod fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(chmod.class, fi, fuse3_operations.chmod$FUNC, scope); - } - static chmod ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.chmod$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle chmod$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("chmod")); - public static VarHandle chmod$VH() { - return fuse3_operations.chmod$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); - * } - */ - public static MemorySegment chmod$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.chmod$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*chmod)(char*,unsigned int,struct fuse3_file_info*); - * } - */ - public static void chmod$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.chmod$VH.set(seg, x); - } - public static MemorySegment chmod$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.chmod$VH.get(seg.asSlice(index*sizeof())); - } - public static void chmod$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.chmod$VH.set(seg.asSlice(index*sizeof()), x); - } - public static chmod chmod(MemorySegment segment, SegmentScope scope) { - return chmod.ofAddress(chmod$get(segment), scope); - } - static final FunctionDescriptor chown$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle chown$MH = RuntimeHelper.downcallHandle( - fuse3_operations.chown$FUNC - ); - /** - * {@snippet : - * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); - * } - */ - public interface chown { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, int _x2, java.lang.foreign.MemorySegment _x3); - static MemorySegment allocate(chown fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(chown.class, fi, fuse3_operations.chown$FUNC, scope); - } - static chown ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, int __x2, java.lang.foreign.MemorySegment __x3) -> { - try { - return (int)fuse3_operations.chown$MH.invokeExact(symbol, __x0, __x1, __x2, __x3); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle chown$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("chown")); - public static VarHandle chown$VH() { - return fuse3_operations.chown$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); - * } - */ - public static MemorySegment chown$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.chown$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*chown)(char*,unsigned int,unsigned int,struct fuse3_file_info*); - * } - */ - public static void chown$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.chown$VH.set(seg, x); - } - public static MemorySegment chown$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.chown$VH.get(seg.asSlice(index*sizeof())); - } - public static void chown$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.chown$VH.set(seg.asSlice(index*sizeof()), x); - } - public static chown chown(MemorySegment segment, SegmentScope scope) { - return chown.ofAddress(chown$get(segment), scope); - } - static final FunctionDescriptor truncate$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle truncate$MH = RuntimeHelper.downcallHandle( - fuse3_operations.truncate$FUNC - ); - /** - * {@snippet : - * int (*truncate)(char*,long long,struct fuse3_file_info*); - * } - */ - public interface truncate { - - int apply(java.lang.foreign.MemorySegment _x0, long _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(truncate fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(truncate.class, fi, fuse3_operations.truncate$FUNC, scope); - } - static truncate ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, long __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.truncate$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle truncate$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("truncate")); - public static VarHandle truncate$VH() { - return fuse3_operations.truncate$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*truncate)(char*,long long,struct fuse3_file_info*); - * } - */ - public static MemorySegment truncate$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.truncate$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*truncate)(char*,long long,struct fuse3_file_info*); - * } - */ - public static void truncate$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.truncate$VH.set(seg, x); - } - public static MemorySegment truncate$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.truncate$VH.get(seg.asSlice(index*sizeof())); - } - public static void truncate$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.truncate$VH.set(seg.asSlice(index*sizeof()), x); - } - public static truncate truncate(MemorySegment segment, SegmentScope scope) { - return truncate.ofAddress(truncate$get(segment), scope); - } - static final FunctionDescriptor open$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle open$MH = RuntimeHelper.downcallHandle( - fuse3_operations.open$FUNC - ); - /** - * {@snippet : - * int (*open)(char*,struct fuse3_file_info*); - * } - */ - public interface open { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(open fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(open.class, fi, fuse3_operations.open$FUNC, scope); - } - static open ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.open$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle open$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("open")); - public static VarHandle open$VH() { - return fuse3_operations.open$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*open)(char*,struct fuse3_file_info*); - * } - */ - public static MemorySegment open$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.open$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*open)(char*,struct fuse3_file_info*); - * } - */ - public static void open$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.open$VH.set(seg, x); - } - public static MemorySegment open$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.open$VH.get(seg.asSlice(index*sizeof())); - } - public static void open$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.open$VH.set(seg.asSlice(index*sizeof()), x); - } - public static open open(MemorySegment segment, SegmentScope scope) { - return open.ofAddress(open$get(segment), scope); - } - static final FunctionDescriptor read$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle read$MH = RuntimeHelper.downcallHandle( - fuse3_operations.read$FUNC - ); - /** - * {@snippet : - * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public interface read { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); - static MemorySegment allocate(read fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(read.class, fi, fuse3_operations.read$FUNC, scope); - } - static read ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { - try { - return (int)fuse3_operations.read$MH.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle read$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("read")); - public static VarHandle read$VH() { - return fuse3_operations.read$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public static MemorySegment read$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.read$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*read)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public static void read$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.read$VH.set(seg, x); - } - public static MemorySegment read$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.read$VH.get(seg.asSlice(index*sizeof())); - } - public static void read$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.read$VH.set(seg.asSlice(index*sizeof()), x); - } - public static read read(MemorySegment segment, SegmentScope scope) { - return read.ofAddress(read$get(segment), scope); - } - static final FunctionDescriptor write$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle write$MH = RuntimeHelper.downcallHandle( - fuse3_operations.write$FUNC - ); - /** - * {@snippet : - * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public interface write { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); - static MemorySegment allocate(write fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(write.class, fi, fuse3_operations.write$FUNC, scope); - } - static write ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { - try { - return (int)fuse3_operations.write$MH.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle write$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("write")); - public static VarHandle write$VH() { - return fuse3_operations.write$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public static MemorySegment write$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.write$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*write)(char*,char*,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public static void write$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.write$VH.set(seg, x); - } - public static MemorySegment write$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.write$VH.get(seg.asSlice(index*sizeof())); - } - public static void write$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.write$VH.set(seg.asSlice(index*sizeof()), x); - } - public static write write(MemorySegment segment, SegmentScope scope) { - return write.ofAddress(write$get(segment), scope); - } - static final FunctionDescriptor statfs$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle statfs$MH = RuntimeHelper.downcallHandle( - fuse3_operations.statfs$FUNC - ); - /** - * {@snippet : - * int (*statfs)(char*,struct fuse_statvfs*); - * } - */ - public interface statfs { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(statfs fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(statfs.class, fi, fuse3_operations.statfs$FUNC, scope); - } - static statfs ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.statfs$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle statfs$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("statfs")); - public static VarHandle statfs$VH() { - return fuse3_operations.statfs$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*statfs)(char*,struct fuse_statvfs*); - * } - */ - public static MemorySegment statfs$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.statfs$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*statfs)(char*,struct fuse_statvfs*); - * } - */ - public static void statfs$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.statfs$VH.set(seg, x); - } - public static MemorySegment statfs$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.statfs$VH.get(seg.asSlice(index*sizeof())); - } - public static void statfs$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.statfs$VH.set(seg.asSlice(index*sizeof()), x); - } - public static statfs statfs(MemorySegment segment, SegmentScope scope) { - return statfs.ofAddress(statfs$get(segment), scope); - } - static final FunctionDescriptor flush$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle flush$MH = RuntimeHelper.downcallHandle( - fuse3_operations.flush$FUNC - ); - /** - * {@snippet : - * int (*flush)(char*,struct fuse3_file_info*); - * } - */ - public interface flush { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(flush fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(flush.class, fi, fuse3_operations.flush$FUNC, scope); - } - static flush ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.flush$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle flush$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("flush")); - public static VarHandle flush$VH() { - return fuse3_operations.flush$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*flush)(char*,struct fuse3_file_info*); - * } - */ - public static MemorySegment flush$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.flush$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*flush)(char*,struct fuse3_file_info*); - * } - */ - public static void flush$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.flush$VH.set(seg, x); - } - public static MemorySegment flush$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.flush$VH.get(seg.asSlice(index*sizeof())); - } - public static void flush$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.flush$VH.set(seg.asSlice(index*sizeof()), x); - } - public static flush flush(MemorySegment segment, SegmentScope scope) { - return flush.ofAddress(flush$get(segment), scope); - } - static final FunctionDescriptor release$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle release$MH = RuntimeHelper.downcallHandle( - fuse3_operations.release$FUNC - ); - /** - * {@snippet : - * int (*release)(char*,struct fuse3_file_info*); - * } - */ - public interface release { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(release fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(release.class, fi, fuse3_operations.release$FUNC, scope); - } - static release ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.release$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle release$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("release")); - public static VarHandle release$VH() { - return fuse3_operations.release$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*release)(char*,struct fuse3_file_info*); - * } - */ - public static MemorySegment release$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.release$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*release)(char*,struct fuse3_file_info*); - * } - */ - public static void release$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.release$VH.set(seg, x); - } - public static MemorySegment release$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.release$VH.get(seg.asSlice(index*sizeof())); - } - public static void release$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.release$VH.set(seg.asSlice(index*sizeof()), x); - } - public static release release(MemorySegment segment, SegmentScope scope) { - return release.ofAddress(release$get(segment), scope); - } - static final FunctionDescriptor fsync$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fsync$MH = RuntimeHelper.downcallHandle( - fuse3_operations.fsync$FUNC - ); - /** - * {@snippet : - * int (*fsync)(char*,int,struct fuse3_file_info*); - * } - */ - public interface fsync { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(fsync fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(fsync.class, fi, fuse3_operations.fsync$FUNC, scope); - } - static fsync ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.fsync$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle fsync$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("fsync")); - public static VarHandle fsync$VH() { - return fuse3_operations.fsync$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*fsync)(char*,int,struct fuse3_file_info*); - * } - */ - public static MemorySegment fsync$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.fsync$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*fsync)(char*,int,struct fuse3_file_info*); - * } - */ - public static void fsync$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.fsync$VH.set(seg, x); - } - public static MemorySegment fsync$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.fsync$VH.get(seg.asSlice(index*sizeof())); - } - public static void fsync$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.fsync$VH.set(seg.asSlice(index*sizeof()), x); - } - public static fsync fsync(MemorySegment segment, SegmentScope scope) { - return fsync.ofAddress(fsync$get(segment), scope); - } - static final FunctionDescriptor setxattr$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle setxattr$MH = RuntimeHelper.downcallHandle( - fuse3_operations.setxattr$FUNC - ); - /** - * {@snippet : - * int (*setxattr)(char*,char*,char*,unsigned long long,int); - * } - */ - public interface setxattr { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, long _x3, int _x4); - static MemorySegment allocate(setxattr fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(setxattr.class, fi, fuse3_operations.setxattr$FUNC, scope); - } - static setxattr ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, long __x3, int __x4) -> { - try { - return (int)fuse3_operations.setxattr$MH.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle setxattr$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("setxattr")); - public static VarHandle setxattr$VH() { - return fuse3_operations.setxattr$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*setxattr)(char*,char*,char*,unsigned long long,int); - * } - */ - public static MemorySegment setxattr$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.setxattr$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*setxattr)(char*,char*,char*,unsigned long long,int); - * } - */ - public static void setxattr$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.setxattr$VH.set(seg, x); - } - public static MemorySegment setxattr$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.setxattr$VH.get(seg.asSlice(index*sizeof())); - } - public static void setxattr$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.setxattr$VH.set(seg.asSlice(index*sizeof()), x); - } - public static setxattr setxattr(MemorySegment segment, SegmentScope scope) { - return setxattr.ofAddress(setxattr$get(segment), scope); - } - static final FunctionDescriptor getxattr$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT - ); - static final MethodHandle getxattr$MH = RuntimeHelper.downcallHandle( - fuse3_operations.getxattr$FUNC - ); - /** - * {@snippet : - * int (*getxattr)(char*,char*,char*,unsigned long long); - * } - */ - public interface getxattr { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, long _x3); - static MemorySegment allocate(getxattr fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(getxattr.class, fi, fuse3_operations.getxattr$FUNC, scope); - } - static getxattr ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, long __x3) -> { - try { - return (int)fuse3_operations.getxattr$MH.invokeExact(symbol, __x0, __x1, __x2, __x3); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle getxattr$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("getxattr")); - public static VarHandle getxattr$VH() { - return fuse3_operations.getxattr$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*getxattr)(char*,char*,char*,unsigned long long); - * } - */ - public static MemorySegment getxattr$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.getxattr$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*getxattr)(char*,char*,char*,unsigned long long); - * } - */ - public static void getxattr$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.getxattr$VH.set(seg, x); - } - public static MemorySegment getxattr$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.getxattr$VH.get(seg.asSlice(index*sizeof())); - } - public static void getxattr$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.getxattr$VH.set(seg.asSlice(index*sizeof()), x); - } - public static getxattr getxattr(MemorySegment segment, SegmentScope scope) { - return getxattr.ofAddress(getxattr$get(segment), scope); - } - static final FunctionDescriptor listxattr$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT - ); - static final MethodHandle listxattr$MH = RuntimeHelper.downcallHandle( - fuse3_operations.listxattr$FUNC - ); - /** - * {@snippet : - * int (*listxattr)(char*,char*,unsigned long long); - * } - */ - public interface listxattr { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2); - static MemorySegment allocate(listxattr fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(listxattr.class, fi, fuse3_operations.listxattr$FUNC, scope); - } - static listxattr ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2) -> { - try { - return (int)fuse3_operations.listxattr$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle listxattr$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("listxattr")); - public static VarHandle listxattr$VH() { - return fuse3_operations.listxattr$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*listxattr)(char*,char*,unsigned long long); - * } - */ - public static MemorySegment listxattr$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.listxattr$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*listxattr)(char*,char*,unsigned long long); - * } - */ - public static void listxattr$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.listxattr$VH.set(seg, x); - } - public static MemorySegment listxattr$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.listxattr$VH.get(seg.asSlice(index*sizeof())); - } - public static void listxattr$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.listxattr$VH.set(seg.asSlice(index*sizeof()), x); - } - public static listxattr listxattr(MemorySegment segment, SegmentScope scope) { - return listxattr.ofAddress(listxattr$get(segment), scope); - } - static final FunctionDescriptor removexattr$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle removexattr$MH = RuntimeHelper.downcallHandle( - fuse3_operations.removexattr$FUNC - ); - /** - * {@snippet : - * int (*removexattr)(char*,char*); - * } - */ - public interface removexattr { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(removexattr fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(removexattr.class, fi, fuse3_operations.removexattr$FUNC, scope); - } - static removexattr ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.removexattr$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle removexattr$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("removexattr")); - public static VarHandle removexattr$VH() { - return fuse3_operations.removexattr$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*removexattr)(char*,char*); - * } - */ - public static MemorySegment removexattr$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.removexattr$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*removexattr)(char*,char*); - * } - */ - public static void removexattr$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.removexattr$VH.set(seg, x); - } - public static MemorySegment removexattr$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.removexattr$VH.get(seg.asSlice(index*sizeof())); - } - public static void removexattr$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.removexattr$VH.set(seg.asSlice(index*sizeof()), x); - } - public static removexattr removexattr(MemorySegment segment, SegmentScope scope) { - return removexattr.ofAddress(removexattr$get(segment), scope); - } - static final FunctionDescriptor opendir$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle opendir$MH = RuntimeHelper.downcallHandle( - fuse3_operations.opendir$FUNC - ); - /** - * {@snippet : - * int (*opendir)(char*,struct fuse3_file_info*); - * } - */ - public interface opendir { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(opendir fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(opendir.class, fi, fuse3_operations.opendir$FUNC, scope); - } - static opendir ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.opendir$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle opendir$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("opendir")); - public static VarHandle opendir$VH() { - return fuse3_operations.opendir$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*opendir)(char*,struct fuse3_file_info*); - * } - */ - public static MemorySegment opendir$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.opendir$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*opendir)(char*,struct fuse3_file_info*); - * } - */ - public static void opendir$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.opendir$VH.set(seg, x); - } - public static MemorySegment opendir$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.opendir$VH.get(seg.asSlice(index*sizeof())); - } - public static void opendir$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.opendir$VH.set(seg.asSlice(index*sizeof()), x); - } - public static opendir opendir(MemorySegment segment, SegmentScope scope) { - return opendir.ofAddress(opendir$get(segment), scope); - } - static final FunctionDescriptor readdir$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle readdir$MH = RuntimeHelper.downcallHandle( - fuse3_operations.readdir$FUNC - ); - /** - * {@snippet : - * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); - * } - */ - public interface readdir { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, long _x3, java.lang.foreign.MemorySegment _x4, int _x5); - static MemorySegment allocate(readdir fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(readdir.class, fi, fuse3_operations.readdir$FUNC, scope); - } - static readdir ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, long __x3, java.lang.foreign.MemorySegment __x4, int __x5) -> { - try { - return (int)fuse3_operations.readdir$MH.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4, __x5); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle readdir$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("readdir")); - public static VarHandle readdir$VH() { - return fuse3_operations.readdir$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); - * } - */ - public static MemorySegment readdir$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.readdir$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*readdir)(char*,void*,int (*)(void*,char*,struct fuse_stat*,long long,enum fuse3_fill_dir_flags),long long,struct fuse3_file_info*,enum fuse3_readdir_flags); - * } - */ - public static void readdir$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.readdir$VH.set(seg, x); - } - public static MemorySegment readdir$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.readdir$VH.get(seg.asSlice(index*sizeof())); - } - public static void readdir$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.readdir$VH.set(seg.asSlice(index*sizeof()), x); - } - public static readdir readdir(MemorySegment segment, SegmentScope scope) { - return readdir.ofAddress(readdir$get(segment), scope); - } - static final FunctionDescriptor releasedir$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle releasedir$MH = RuntimeHelper.downcallHandle( - fuse3_operations.releasedir$FUNC - ); - /** - * {@snippet : - * int (*releasedir)(char*,struct fuse3_file_info*); - * } - */ - public interface releasedir { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(releasedir fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(releasedir.class, fi, fuse3_operations.releasedir$FUNC, scope); - } - static releasedir ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (int)fuse3_operations.releasedir$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle releasedir$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("releasedir")); - public static VarHandle releasedir$VH() { - return fuse3_operations.releasedir$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*releasedir)(char*,struct fuse3_file_info*); - * } - */ - public static MemorySegment releasedir$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.releasedir$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*releasedir)(char*,struct fuse3_file_info*); - * } - */ - public static void releasedir$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.releasedir$VH.set(seg, x); - } - public static MemorySegment releasedir$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.releasedir$VH.get(seg.asSlice(index*sizeof())); - } - public static void releasedir$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.releasedir$VH.set(seg.asSlice(index*sizeof()), x); - } - public static releasedir releasedir(MemorySegment segment, SegmentScope scope) { - return releasedir.ofAddress(releasedir$get(segment), scope); - } - static final FunctionDescriptor fsyncdir$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fsyncdir$MH = RuntimeHelper.downcallHandle( - fuse3_operations.fsyncdir$FUNC - ); - /** - * {@snippet : - * int (*fsyncdir)(char*,int,struct fuse3_file_info*); - * } - */ - public interface fsyncdir { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(fsyncdir fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(fsyncdir.class, fi, fuse3_operations.fsyncdir$FUNC, scope); - } - static fsyncdir ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.fsyncdir$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle fsyncdir$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("fsyncdir")); - public static VarHandle fsyncdir$VH() { - return fuse3_operations.fsyncdir$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*fsyncdir)(char*,int,struct fuse3_file_info*); - * } - */ - public static MemorySegment fsyncdir$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.fsyncdir$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*fsyncdir)(char*,int,struct fuse3_file_info*); - * } - */ - public static void fsyncdir$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.fsyncdir$VH.set(seg, x); - } - public static MemorySegment fsyncdir$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.fsyncdir$VH.get(seg.asSlice(index*sizeof())); - } - public static void fsyncdir$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.fsyncdir$VH.set(seg.asSlice(index*sizeof()), x); - } - public static fsyncdir fsyncdir(MemorySegment segment, SegmentScope scope) { - return fsyncdir.ofAddress(fsyncdir$get(segment), scope); - } - static final FunctionDescriptor init$FUNC = FunctionDescriptor.of(Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle init$MH = RuntimeHelper.downcallHandle( - fuse3_operations.init$FUNC - ); - /** - * {@snippet : - * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); - * } - */ - public interface init { - - java.lang.foreign.MemorySegment apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1); - static MemorySegment allocate(init fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(init.class, fi, fuse3_operations.init$FUNC, scope); - } - static init ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1) -> { - try { - return (java.lang.foreign.MemorySegment)fuse3_operations.init$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle init$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("init")); - public static VarHandle init$VH() { - return fuse3_operations.init$VH; - } - /** - * Getter for field: - * {@snippet : - * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); - * } - */ - public static MemorySegment init$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.init$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * void* (*init)(struct fuse3_conn_info*,struct fuse3_config*); - * } - */ - public static void init$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.init$VH.set(seg, x); - } - public static MemorySegment init$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.init$VH.get(seg.asSlice(index*sizeof())); - } - public static void init$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.init$VH.set(seg.asSlice(index*sizeof()), x); - } - public static init init(MemorySegment segment, SegmentScope scope) { - return init.ofAddress(init$get(segment), scope); - } - static final FunctionDescriptor destroy$FUNC = FunctionDescriptor.ofVoid( - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle destroy$MH = RuntimeHelper.downcallHandle( - fuse3_operations.destroy$FUNC - ); - /** - * {@snippet : - * void (*destroy)(void*); - * } - */ - public interface destroy { - - void apply(java.lang.foreign.MemorySegment _x0); - static MemorySegment allocate(destroy fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(destroy.class, fi, fuse3_operations.destroy$FUNC, scope); - } - static destroy ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0) -> { - try { - fuse3_operations.destroy$MH.invokeExact(symbol, __x0); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle destroy$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("destroy")); - public static VarHandle destroy$VH() { - return fuse3_operations.destroy$VH; - } - /** - * Getter for field: - * {@snippet : - * void (*destroy)(void*); - * } - */ - public static MemorySegment destroy$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.destroy$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * void (*destroy)(void*); - * } - */ - public static void destroy$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.destroy$VH.set(seg, x); - } - public static MemorySegment destroy$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.destroy$VH.get(seg.asSlice(index*sizeof())); - } - public static void destroy$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.destroy$VH.set(seg.asSlice(index*sizeof()), x); - } - public static destroy destroy(MemorySegment segment, SegmentScope scope) { - return destroy.ofAddress(destroy$get(segment), scope); - } - static final FunctionDescriptor access$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle access$MH = RuntimeHelper.downcallHandle( - fuse3_operations.access$FUNC - ); - /** - * {@snippet : - * int (*access)(char*,int); - * } - */ - public interface access { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1); - static MemorySegment allocate(access fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(access.class, fi, fuse3_operations.access$FUNC, scope); - } - static access ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1) -> { - try { - return (int)fuse3_operations.access$MH.invokeExact(symbol, __x0, __x1); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle access$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("access")); - public static VarHandle access$VH() { - return fuse3_operations.access$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*access)(char*,int); - * } - */ - public static MemorySegment access$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.access$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*access)(char*,int); - * } - */ - public static void access$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.access$VH.set(seg, x); - } - public static MemorySegment access$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.access$VH.get(seg.asSlice(index*sizeof())); - } - public static void access$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.access$VH.set(seg.asSlice(index*sizeof()), x); - } - public static access access(MemorySegment segment, SegmentScope scope) { - return access.ofAddress(access$get(segment), scope); - } - static final FunctionDescriptor create$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle create$MH = RuntimeHelper.downcallHandle( - fuse3_operations.create$FUNC - ); - /** - * {@snippet : - * int (*create)(char*,unsigned int,struct fuse3_file_info*); - * } - */ - public interface create { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(create fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(create.class, fi, fuse3_operations.create$FUNC, scope); - } - static create ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.create$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle create$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("create")); - public static VarHandle create$VH() { - return fuse3_operations.create$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*create)(char*,unsigned int,struct fuse3_file_info*); - * } - */ - public static MemorySegment create$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.create$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*create)(char*,unsigned int,struct fuse3_file_info*); - * } - */ - public static void create$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.create$VH.set(seg, x); - } - public static MemorySegment create$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.create$VH.get(seg.asSlice(index*sizeof())); - } - public static void create$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.create$VH.set(seg.asSlice(index*sizeof()), x); - } - public static create create(MemorySegment segment, SegmentScope scope) { - return create.ofAddress(create$get(segment), scope); - } - static final FunctionDescriptor lock$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle lock$MH = RuntimeHelper.downcallHandle( - fuse3_operations.lock$FUNC - ); - /** - * {@snippet : - * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); - * } - */ - public interface lock { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, int _x2, java.lang.foreign.MemorySegment _x3); - static MemorySegment allocate(lock fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(lock.class, fi, fuse3_operations.lock$FUNC, scope); - } - static lock ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, int __x2, java.lang.foreign.MemorySegment __x3) -> { - try { - return (int)fuse3_operations.lock$MH.invokeExact(symbol, __x0, __x1, __x2, __x3); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle lock$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("lock")); - public static VarHandle lock$VH() { - return fuse3_operations.lock$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); - * } - */ - public static MemorySegment lock$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.lock$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*lock)(char*,struct fuse3_file_info*,int,struct fuse_flock*); - * } - */ - public static void lock$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.lock$VH.set(seg, x); - } - public static MemorySegment lock$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.lock$VH.get(seg.asSlice(index*sizeof())); - } - public static void lock$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.lock$VH.set(seg.asSlice(index*sizeof()), x); - } - public static lock lock(MemorySegment segment, SegmentScope scope) { - return lock.ofAddress(lock$get(segment), scope); - } - static final FunctionDescriptor utimens$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle utimens$MH = RuntimeHelper.downcallHandle( - fuse3_operations.utimens$FUNC - ); - /** - * {@snippet : - * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); - * } - */ - public interface utimens { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(utimens fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(utimens.class, fi, fuse3_operations.utimens$FUNC, scope); - } - static utimens ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.utimens$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle utimens$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("utimens")); - public static VarHandle utimens$VH() { - return fuse3_operations.utimens$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); - * } - */ - public static MemorySegment utimens$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.utimens$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*utimens)(char*,struct fuse_timespec*,struct fuse3_file_info*); - * } - */ - public static void utimens$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.utimens$VH.set(seg, x); - } - public static MemorySegment utimens$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.utimens$VH.get(seg.asSlice(index*sizeof())); - } - public static void utimens$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.utimens$VH.set(seg.asSlice(index*sizeof()), x); - } - public static utimens utimens(MemorySegment segment, SegmentScope scope) { - return utimens.ofAddress(utimens$get(segment), scope); - } - static final FunctionDescriptor bmap$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle bmap$MH = RuntimeHelper.downcallHandle( - fuse3_operations.bmap$FUNC - ); - /** - * {@snippet : - * int (*bmap)(char*,unsigned long long,unsigned long long*); - * } - */ - public interface bmap { - - int apply(java.lang.foreign.MemorySegment _x0, long _x1, java.lang.foreign.MemorySegment _x2); - static MemorySegment allocate(bmap fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(bmap.class, fi, fuse3_operations.bmap$FUNC, scope); - } - static bmap ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, long __x1, java.lang.foreign.MemorySegment __x2) -> { - try { - return (int)fuse3_operations.bmap$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle bmap$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("bmap")); - public static VarHandle bmap$VH() { - return fuse3_operations.bmap$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*bmap)(char*,unsigned long long,unsigned long long*); - * } - */ - public static MemorySegment bmap$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.bmap$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*bmap)(char*,unsigned long long,unsigned long long*); - * } - */ - public static void bmap$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.bmap$VH.set(seg, x); - } - public static MemorySegment bmap$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.bmap$VH.get(seg.asSlice(index*sizeof())); - } - public static void bmap$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.bmap$VH.set(seg.asSlice(index*sizeof()), x); - } - public static bmap bmap(MemorySegment segment, SegmentScope scope) { - return bmap.ofAddress(bmap$get(segment), scope); - } - static final FunctionDescriptor ioctl$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle ioctl$MH = RuntimeHelper.downcallHandle( - fuse3_operations.ioctl$FUNC - ); - /** - * {@snippet : - * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); - * } - */ - public interface ioctl { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3, int _x4, java.lang.foreign.MemorySegment _x5); - static MemorySegment allocate(ioctl fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(ioctl.class, fi, fuse3_operations.ioctl$FUNC, scope); - } - static ioctl ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3, int __x4, java.lang.foreign.MemorySegment __x5) -> { - try { - return (int)fuse3_operations.ioctl$MH.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4, __x5); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle ioctl$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("ioctl")); - public static VarHandle ioctl$VH() { - return fuse3_operations.ioctl$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); - * } - */ - public static MemorySegment ioctl$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.ioctl$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*ioctl)(char*,int,void*,struct fuse3_file_info*,unsigned int,void*); - * } - */ - public static void ioctl$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.ioctl$VH.set(seg, x); - } - public static MemorySegment ioctl$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.ioctl$VH.get(seg.asSlice(index*sizeof())); - } - public static void ioctl$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.ioctl$VH.set(seg.asSlice(index*sizeof()), x); - } - public static ioctl ioctl(MemorySegment segment, SegmentScope scope) { - return ioctl.ofAddress(ioctl$get(segment), scope); - } - static final FunctionDescriptor poll$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle poll$MH = RuntimeHelper.downcallHandle( - fuse3_operations.poll$FUNC - ); - /** - * {@snippet : - * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); - * } - */ - public interface poll { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, java.lang.foreign.MemorySegment _x2, java.lang.foreign.MemorySegment _x3); - static MemorySegment allocate(poll fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(poll.class, fi, fuse3_operations.poll$FUNC, scope); - } - static poll ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, java.lang.foreign.MemorySegment __x2, java.lang.foreign.MemorySegment __x3) -> { - try { - return (int)fuse3_operations.poll$MH.invokeExact(symbol, __x0, __x1, __x2, __x3); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle poll$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("poll")); - public static VarHandle poll$VH() { - return fuse3_operations.poll$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); - * } - */ - public static MemorySegment poll$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.poll$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*poll)(char*,struct fuse3_file_info*,struct fuse3_pollhandle*,unsigned int*); - * } - */ - public static void poll$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.poll$VH.set(seg, x); - } - public static MemorySegment poll$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.poll$VH.get(seg.asSlice(index*sizeof())); - } - public static void poll$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.poll$VH.set(seg.asSlice(index*sizeof()), x); - } - public static poll poll(MemorySegment segment, SegmentScope scope) { - return poll.ofAddress(poll$get(segment), scope); - } - static final FunctionDescriptor write_buf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle write_buf$MH = RuntimeHelper.downcallHandle( - fuse3_operations.write_buf$FUNC - ); - /** - * {@snippet : - * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); - * } - */ - public interface write_buf { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, java.lang.foreign.MemorySegment _x3); - static MemorySegment allocate(write_buf fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(write_buf.class, fi, fuse3_operations.write_buf$FUNC, scope); - } - static write_buf ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, java.lang.foreign.MemorySegment __x3) -> { - try { - return (int)fuse3_operations.write_buf$MH.invokeExact(symbol, __x0, __x1, __x2, __x3); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle write_buf$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("write_buf")); - public static VarHandle write_buf$VH() { - return fuse3_operations.write_buf$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); - * } - */ - public static MemorySegment write_buf$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.write_buf$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*write_buf)(char*,struct fuse3_bufvec*,long long,struct fuse3_file_info*); - * } - */ - public static void write_buf$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.write_buf$VH.set(seg, x); - } - public static MemorySegment write_buf$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.write_buf$VH.get(seg.asSlice(index*sizeof())); - } - public static void write_buf$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.write_buf$VH.set(seg.asSlice(index*sizeof()), x); - } - public static write_buf write_buf(MemorySegment segment, SegmentScope scope) { - return write_buf.ofAddress(write_buf$get(segment), scope); - } - static final FunctionDescriptor read_buf$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle read_buf$MH = RuntimeHelper.downcallHandle( - fuse3_operations.read_buf$FUNC - ); - /** - * {@snippet : - * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public interface read_buf { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); - static MemorySegment allocate(read_buf fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(read_buf.class, fi, fuse3_operations.read_buf$FUNC, scope); - } - static read_buf ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { - try { - return (int)fuse3_operations.read_buf$MH.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle read_buf$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("read_buf")); - public static VarHandle read_buf$VH() { - return fuse3_operations.read_buf$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public static MemorySegment read_buf$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.read_buf$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*read_buf)(char*,struct fuse3_bufvec**,unsigned long long,long long,struct fuse3_file_info*); - * } - */ - public static void read_buf$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.read_buf$VH.set(seg, x); - } - public static MemorySegment read_buf$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.read_buf$VH.get(seg.asSlice(index*sizeof())); - } - public static void read_buf$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.read_buf$VH.set(seg.asSlice(index*sizeof()), x); - } - public static read_buf read_buf(MemorySegment segment, SegmentScope scope) { - return read_buf.ofAddress(read_buf$get(segment), scope); - } - static final FunctionDescriptor flock$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT - ); - static final MethodHandle flock$MH = RuntimeHelper.downcallHandle( - fuse3_operations.flock$FUNC - ); - /** - * {@snippet : - * int (*flock)(char*,struct fuse3_file_info*,int); - * } - */ - public interface flock { - - int apply(java.lang.foreign.MemorySegment _x0, java.lang.foreign.MemorySegment _x1, int _x2); - static MemorySegment allocate(flock fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(flock.class, fi, fuse3_operations.flock$FUNC, scope); - } - static flock ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, java.lang.foreign.MemorySegment __x1, int __x2) -> { - try { - return (int)fuse3_operations.flock$MH.invokeExact(symbol, __x0, __x1, __x2); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle flock$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("flock")); - public static VarHandle flock$VH() { - return fuse3_operations.flock$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*flock)(char*,struct fuse3_file_info*,int); - * } - */ - public static MemorySegment flock$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.flock$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*flock)(char*,struct fuse3_file_info*,int); - * } - */ - public static void flock$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.flock$VH.set(seg, x); - } - public static MemorySegment flock$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.flock$VH.get(seg.asSlice(index*sizeof())); - } - public static void flock$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.flock$VH.set(seg.asSlice(index*sizeof()), x); - } - public static flock flock(MemorySegment segment, SegmentScope scope) { - return flock.ofAddress(flock$get(segment), scope); - } - static final FunctionDescriptor fallocate$FUNC = FunctionDescriptor.of(Constants$root.C_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT, - Constants$root.C_LONG$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_LONG_LONG$LAYOUT, - Constants$root.C_POINTER$LAYOUT - ); - static final MethodHandle fallocate$MH = RuntimeHelper.downcallHandle( - fuse3_operations.fallocate$FUNC - ); - /** - * {@snippet : - * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); - * } - */ - public interface fallocate { - - int apply(java.lang.foreign.MemorySegment _x0, int _x1, long _x2, long _x3, java.lang.foreign.MemorySegment _x4); - static MemorySegment allocate(fallocate fi, SegmentScope scope) { - return RuntimeHelper.upcallStub(fallocate.class, fi, fuse3_operations.fallocate$FUNC, scope); - } - static fallocate ofAddress(MemorySegment addr, SegmentScope scope) { - MemorySegment symbol = MemorySegment.ofAddress(addr.address(), 0, scope); - return (java.lang.foreign.MemorySegment __x0, int __x1, long __x2, long __x3, java.lang.foreign.MemorySegment __x4) -> { - try { - return (int)fuse3_operations.fallocate$MH.invokeExact(symbol, __x0, __x1, __x2, __x3, __x4); - } catch (Throwable ex$) { - throw new AssertionError("should not reach here", ex$); - } - }; - } - } - - static final VarHandle fallocate$VH = $struct$LAYOUT.varHandle(MemoryLayout.PathElement.groupElement("fallocate")); - public static VarHandle fallocate$VH() { - return fuse3_operations.fallocate$VH; - } - /** - * Getter for field: - * {@snippet : - * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); - * } - */ - public static MemorySegment fallocate$get(MemorySegment seg) { - return (java.lang.foreign.MemorySegment)fuse3_operations.fallocate$VH.get(seg); - } - /** - * Setter for field: - * {@snippet : - * int (*fallocate)(char*,int,long long,long long,struct fuse3_file_info*); - * } - */ - public static void fallocate$set(MemorySegment seg, MemorySegment x) { - fuse3_operations.fallocate$VH.set(seg, x); - } - public static MemorySegment fallocate$get(MemorySegment seg, long index) { - return (java.lang.foreign.MemorySegment)fuse3_operations.fallocate$VH.get(seg.asSlice(index*sizeof())); - } - public static void fallocate$set(MemorySegment seg, long index, MemorySegment x) { - fuse3_operations.fallocate$VH.set(seg.asSlice(index*sizeof()), x); - } - public static fallocate fallocate(MemorySegment segment, SegmentScope scope) { - return fallocate.ofAddress(fallocate$get(segment), scope); - } - public static long sizeof() { return $LAYOUT().byteSize(); } - public static MemorySegment allocate(SegmentAllocator allocator) { return allocator.allocate($LAYOUT()); } - public static MemorySegment allocateArray(long len, SegmentAllocator allocator) { - return allocator.allocate(MemoryLayout.sequenceLayout(len, $LAYOUT())); - } - public static MemorySegment ofAddress(MemorySegment addr, SegmentScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); } -} - - diff --git a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FileInfoImplTest.java b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FileInfoImplTest.java index 2f3480e2..12b5a82c 100644 --- a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FileInfoImplTest.java +++ b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FileInfoImplTest.java @@ -1,7 +1,7 @@ package org.cryptomator.jfuse.win; -import org.cryptomator.jfuse.win.extr.fcntl_h; -import org.cryptomator.jfuse.win.extr.fuse3_file_info; +import org.cryptomator.jfuse.win.extr.fcntl.fcntl_h; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_file_info; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.params.ParameterizedTest; @@ -20,7 +20,7 @@ public class FileInfoImplTest { @MethodSource("testGetOpenFlagParams") @DisplayName("test getOpenFlags()") public void testGetOpenFlags(int flags, Set expectedResult) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var fi = new FileInfoImpl(fuse3_file_info.allocate(arena)); fuse3_file_info.flags$set(fi.segment(), flags); diff --git a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConfigImplTest.java b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConfigImplTest.java index a8f0ab96..3e1485f9 100644 --- a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConfigImplTest.java +++ b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConfigImplTest.java @@ -1,7 +1,7 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.FuseConfig; -import org.cryptomator.jfuse.win.extr.fuse3_config; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_config; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Named; @@ -21,9 +21,9 @@ public class FuseConfigImplTest { @ParameterizedTest(name = "{1}") @MethodSource public void testGetters(SetInMemorySegment setter, GetInFuseConfig getter, Number value) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var segment = fuse3_config.allocate(arena); - var fuseConfig = new FuseConfigImpl(segment, arena.scope()); + var fuseConfig = new FuseConfigImpl(segment, arena); setter.accept(segment, value); diff --git a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConnInfoImplTest.java b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConnInfoImplTest.java index f846a53d..dc9ca660 100644 --- a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConnInfoImplTest.java +++ b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseConnInfoImplTest.java @@ -1,7 +1,7 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.FuseConnInfo; -import org.cryptomator.jfuse.win.extr.fuse3_conn_info; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_conn_info; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Named; @@ -21,9 +21,9 @@ public class FuseConnInfoImplTest { @ParameterizedTest(name = "{1}") @MethodSource public void testGetters(SetInMemorySegment setter, GetInConnInfo getter) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var segment = fuse3_conn_info.allocate(arena); - var connInfo = new FuseConnInfoImpl(segment, arena.scope()); + var connInfo = new FuseConnInfoImpl(segment, arena); setter.accept(segment, 42); @@ -54,9 +54,9 @@ private interface GetInConnInfo extends Function {} @ParameterizedTest(name = "{0}") @MethodSource public void testSetters(SetInConnInfo setter, GetInMemorySegment getter) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var segment = fuse3_conn_info.allocate(arena); - var connInfo = new FuseConnInfoImpl(segment, arena.scope()); + var connInfo = new FuseConnInfoImpl(segment, arena); setter.accept(connInfo, 42); diff --git a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseImplTest.java b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseImplTest.java index f8db3186..dc6c1170 100644 --- a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseImplTest.java +++ b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/FuseImplTest.java @@ -7,12 +7,12 @@ import org.cryptomator.jfuse.api.FuseMountFailedException; import org.cryptomator.jfuse.api.FuseOperations; import org.cryptomator.jfuse.win.extr.fuse2.fuse2_h; -import org.cryptomator.jfuse.win.extr.fuse3_config; -import org.cryptomator.jfuse.win.extr.fuse3_conn_info; -import org.cryptomator.jfuse.win.extr.fuse3_file_info; -import org.cryptomator.jfuse.win.extr.fuse_h; -import org.cryptomator.jfuse.win.extr.fuse_stat; -import org.cryptomator.jfuse.win.extr.fuse_timespec; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_config; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_conn_info; +import org.cryptomator.jfuse.win.extr.fuse3.fuse3_file_info; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_h; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_stat; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_timespec; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -113,7 +113,7 @@ public void testAdjustMountPoint() throws FuseMountFailedException, InterruptedE @DisplayName("parseArgs") public void testParseArgs() { try (var fuseH = Mockito.mockStatic(fuse2_h.class); - var arena = Arena.openConfined()) { + var arena = Arena.ofConfined()) { fuseH.when(() -> fuse2_h.fuse_parse_cmdline(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any())).then(invocation -> { MemorySegment mp = invocation.getArgument(1); MemorySegment mt = invocation.getArgument(2); @@ -141,7 +141,7 @@ public class FlushFsyncFsyncdir { @Test @DisplayName("flush(\"/foo\", fi)") public void testFlush() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var fi = fuse3_file_info.allocate(arena); Mockito.doReturn(42).when(fuseOps).flush(Mockito.eq("/foo"), Mockito.any()); @@ -155,7 +155,7 @@ public void testFlush() { @Test @DisplayName("fsync(\"/foo\", 1, fi)") public void testFsync() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var fi = fuse3_file_info.allocate(arena); Mockito.doReturn(42).when(fuseOps).fsync(Mockito.eq("/foo"), Mockito.eq(1), Mockito.any()); @@ -169,7 +169,7 @@ public void testFsync() { @Test @DisplayName("fsyncdir(\"/foo\", 1, fi)") public void testFsyncdir() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var fi = fuse3_file_info.allocate(arena); Mockito.doReturn(42).when(fuseOps).fsyncdir(Mockito.eq("/foo"), Mockito.eq(1), Mockito.any()); @@ -185,7 +185,7 @@ public void testFsyncdir() { @DisplayName("init() sets fuse_conn_info.wants |= FUSE_CAP_READDIRPLUS") @Test public void testInit() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var result = new AtomicInteger(); Mockito.doAnswer(invocation -> { FuseConnInfo connInfo = invocation.getArgument(0); @@ -210,7 +210,7 @@ public void testInit() { public void testUtimens(long sec0, long nsec0, long sec1, long nsec1) { Instant expectedATime = Instant.ofEpochSecond(sec0, nsec0); Instant expectedMTime = Instant.ofEpochSecond(sec1, nsec1); - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var times = fuse_timespec.allocateArray(2, arena); var fi = arena.allocate(fuse3_file_info.$LAYOUT()); @@ -233,7 +233,7 @@ public class Attr { @Test @DisplayName("getattr") public void testGetattr() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var attr = fuse_stat.allocate(arena); var fi = arena.allocate(fuse3_file_info.$LAYOUT()); @@ -248,7 +248,7 @@ public void testGetattr() { @Test @DisplayName("getxattr") public void testGetxattr() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var name = arena.allocateUtf8String("bar"); var value = arena.allocate(100); @@ -264,7 +264,7 @@ public void testGetxattr() { @Test @DisplayName("setxattr") public void testSetxattr() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var name = arena.allocateUtf8String("bar"); var value = arena.allocate(100); @@ -280,7 +280,7 @@ public void testSetxattr() { @Test @DisplayName("listxattr") public void testListxattr() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var list = arena.allocate(100); @@ -295,7 +295,7 @@ public void testListxattr() { @Test @DisplayName("removexattr") public void testRemovexattr() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var name = arena.allocateUtf8String("bar"); @@ -313,7 +313,7 @@ public void testRemovexattr() { @Test @DisplayName("truncate") public void testTruncate() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var fi = arena.allocate(fuse3_file_info.$LAYOUT()); Mockito.doReturn(42).when(fuseOps).truncate(Mockito.eq("/foo"), Mockito.eq(1337L), Mockito.argThat(usesSameMemorySegement(fi))); @@ -327,7 +327,7 @@ public void testTruncate() { @Test @DisplayName("chown") public void testChown() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var path = arena.allocateUtf8String("/foo"); var fi = fuse3_file_info.allocate(arena); Mockito.doReturn(42).when(fuseOps).chown(Mockito.eq("/foo"), Mockito.eq(42), Mockito.eq(1337), Mockito.any()); diff --git a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/StatImplTest.java b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/StatImplTest.java index 88bf4959..3e775800 100644 --- a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/StatImplTest.java +++ b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/StatImplTest.java @@ -1,7 +1,7 @@ package org.cryptomator.jfuse.win; import org.cryptomator.jfuse.api.Stat; -import org.cryptomator.jfuse.win.extr.fuse_stat; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_stat; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Named; @@ -21,9 +21,9 @@ public class StatImplTest { @ParameterizedTest(name = "{1}") @MethodSource public void testGetters(SetInMemorySegment setter, GetInStat getter, Number value) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var segment = fuse_stat.allocate(arena); - var stat = new StatImpl(segment, arena.scope()); + var stat = new StatImpl(segment, arena); setter.accept(segment, value); @@ -49,9 +49,9 @@ private interface GetInStat extends Function {} @ParameterizedTest(name = "{0}") @MethodSource public void testSetters(SetInStat setter, GetInMemorySegment getter, Number value) { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var segment = fuse_stat.allocate(arena); - var stat = new StatImpl(segment, arena.scope()); + var stat = new StatImpl(segment, arena); setter.accept(stat, value); diff --git a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/TimeSpecImplTest.java b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/TimeSpecImplTest.java index df7928d4..e447ec1a 100644 --- a/jfuse-win/src/test/java/org/cryptomator/jfuse/win/TimeSpecImplTest.java +++ b/jfuse-win/src/test/java/org/cryptomator/jfuse/win/TimeSpecImplTest.java @@ -1,6 +1,6 @@ package org.cryptomator.jfuse.win; -import org.cryptomator.jfuse.win.extr.fuse_timespec; +import org.cryptomator.jfuse.win.extr.fuse3.fuse_timespec; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -13,7 +13,7 @@ public class TimeSpecImplTest { @Test @DisplayName("test get()") public void testGet() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var timeSpec = new TimeSpecImpl(fuse_timespec.allocate(arena)); fuse_timespec.tv_sec$set(timeSpec.segment(), 123L); fuse_timespec.tv_nsec$set(timeSpec.segment(), 456L); @@ -28,7 +28,7 @@ public void testGet() { @Test @DisplayName("test set()") public void testSet() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var timeSpec = new TimeSpecImpl(fuse_timespec.allocate(arena)); fuse_timespec.tv_sec$set(timeSpec.segment(), 0L); fuse_timespec.tv_nsec$set(timeSpec.segment(), 0L); @@ -43,7 +43,7 @@ public void testSet() { @Test @DisplayName("test isUtimeOmit()") public void testIsUtimeOmit() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var timeSpec = new TimeSpecImpl(fuse_timespec.allocate(arena)); Assertions.assertFalse(timeSpec.isUtimeOmit()); @@ -53,7 +53,7 @@ public void testIsUtimeOmit() { @Test @DisplayName("test isUtimeNow()") public void testIsUtimeNow() { - try (var arena = Arena.openConfined()) { + try (var arena = Arena.ofConfined()) { var timeSpec = new TimeSpecImpl(fuse_timespec.allocate(arena)); Assertions.assertFalse(timeSpec.isUtimeNow());