Class IOUringRegionDesc

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class IOUringRegionDesc extends Struct<IOUringRegionDesc> implements NativeResource

 struct io_uring_region_desc {
     __u64 user_addr;
     __u64 size;
     __u32 flags;
     __u32 id;
     __u64 mmap_offset;
     __u64 __resv[4];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • USER_ADDR

      public static final int USER_ADDR
      The struct member offsets.
    • SIZE

      public static final int SIZE
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • ID

      public static final int ID
      The struct member offsets.
    • MMAP_OFFSET

      public static final int MMAP_OFFSET
      The struct member offsets.
    • __RESV

      public static final int __RESV
      The struct member offsets.
  • Constructor Details

    • IOUringRegionDesc

      public IOUringRegionDesc(ByteBuffer container)
      Creates a IOUringRegionDesc instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<IOUringRegionDesc>
    • user_addr

      public long user_addr()
      Returns:
      the value of the user_addr field.
    • size

      public long size()
      Returns:
      the value of the size field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • id

      public int id()
      Returns:
      the value of the id field.
    • mmap_offset

      public long mmap_offset()
      Returns:
      the value of the mmap_offset field.
    • user_addr

      public IOUringRegionDesc user_addr(long value)
      Sets the specified value to the user_addr field.
    • size

      public IOUringRegionDesc size(long value)
      Sets the specified value to the size field.
    • flags

      public IOUringRegionDesc flags(int value)
      Sets the specified value to the flags field.
    • id

      public IOUringRegionDesc id(int value)
      Sets the specified value to the id field.
    • mmap_offset

      public IOUringRegionDesc mmap_offset(long value)
      Sets the specified value to the mmap_offset field.
    • set

      public IOUringRegionDesc set(long user_addr, long size, int flags, int id, long mmap_offset)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static IOUringRegionDesc malloc()
      Returns a new IOUringRegionDesc instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static IOUringRegionDesc calloc()
      Returns a new IOUringRegionDesc instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static IOUringRegionDesc create()
      Returns a new IOUringRegionDesc instance allocated with BufferUtils.
    • create

      public static IOUringRegionDesc create(long address)
      Returns a new IOUringRegionDesc instance for the specified memory address.
    • createSafe

      public static @Nullable IOUringRegionDesc createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOUringRegionDesc.Buffer malloc(int capacity)
      Returns a new IOUringRegionDesc.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static IOUringRegionDesc.Buffer calloc(int capacity)
      Returns a new IOUringRegionDesc.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOUringRegionDesc.Buffer create(int capacity)
      Returns a new IOUringRegionDesc.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOUringRegionDesc.Buffer create(long address, int capacity)
      Create a IOUringRegionDesc.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable IOUringRegionDesc.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOUringRegionDesc malloc(MemoryStack stack)
      Returns a new IOUringRegionDesc instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static IOUringRegionDesc calloc(MemoryStack stack)
      Returns a new IOUringRegionDesc instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static IOUringRegionDesc.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new IOUringRegionDesc.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static IOUringRegionDesc.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new IOUringRegionDesc.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nuser_addr

      public static long nuser_addr(long struct)
      Unsafe version of user_addr().
    • nsize

      public static long nsize(long struct)
      Unsafe version of size().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nid

      public static int nid(long struct)
      Unsafe version of id().
    • nmmap_offset

      public static long nmmap_offset(long struct)
      Unsafe version of mmap_offset().
    • n__resv

      public static LongBuffer n__resv(long struct)
    • n__resv

      public static long n__resv(long struct, int index)
    • nuser_addr

      public static void nuser_addr(long struct, long value)
      Unsafe version of user_addr.
    • nsize

      public static void nsize(long struct, long value)
      Unsafe version of size.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nid

      public static void nid(long struct, int value)
      Unsafe version of id.
    • nmmap_offset

      public static void nmmap_offset(long struct, long value)
      Unsafe version of mmap_offset.
    • n__resv

      public static void n__resv(long struct, LongBuffer value)
    • n__resv

      public static void n__resv(long struct, int index, long value)