Class IOURingBufReg

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<IOURingBufReg>
org.lwjgl.system.linux.liburing.IOURingBufReg
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class IOURingBufReg extends org.lwjgl.system.Struct<IOURingBufReg> implements org.lwjgl.system.NativeResource
Argument for IORING_(UN)REGISTER_PBUF_RING.

Layout


 struct io_uring_buf_reg {
     __u64 ring_addr;
     __u32 ring_entries;
     __u16 bgid;
     __u16 flags;
     __u64 resv[3];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int RING_ADDR
      The struct member offsets.
    • RING_ENTRIES

      public static final int RING_ENTRIES
      The struct member offsets.
    • BGID

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

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

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

    • IOURingBufReg

      public IOURingBufReg(ByteBuffer container)
      Creates a IOURingBufReg 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<IOURingBufReg>
    • ring_addr

      public long ring_addr()
      Returns:
      the value of the ring_addr field.
    • ring_entries

      public int ring_entries()
      Returns:
      the value of the ring_entries field.
    • bgid

      public short bgid()
      Returns:
      the value of the bgid field.
    • flags

      public short flags()
      Returns:
      the value of the flags field.
    • resv

      public LongBuffer resv()
      Returns:
      a LongBuffer view of the resv field.
    • resv

      public long resv(int index)
      Returns:
      the value at the specified index of the resv field.
    • ring_addr

      public IOURingBufReg ring_addr(long value)
      Sets the specified value to the ring_addr field.
    • ring_entries

      public IOURingBufReg ring_entries(int value)
      Sets the specified value to the ring_entries field.
    • bgid

      public IOURingBufReg bgid(short value)
      Sets the specified value to the bgid field.
    • flags

      public IOURingBufReg flags(short value)
      Sets the specified value to the flags field.
    • resv

      public IOURingBufReg resv(LongBuffer value)
      Copies the specified LongBuffer to the resv field.
    • resv

      public IOURingBufReg resv(int index, long value)
      Sets the specified value at the specified index of the resv field.
    • set

      public IOURingBufReg set(long ring_addr, int ring_entries, short bgid, short flags, LongBuffer resv)
      Initializes this struct with the specified values.
    • set

      public IOURingBufReg set(IOURingBufReg src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static IOURingBufReg.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new IOURingBufReg.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
    • nring_addr

      public static long nring_addr(long struct)
      Unsafe version of ring_addr().
    • nring_entries

      public static int nring_entries(long struct)
      Unsafe version of ring_entries().
    • nbgid

      public static short nbgid(long struct)
      Unsafe version of bgid().
    • nflags

      public static short nflags(long struct)
      Unsafe version of flags().
    • nresv

      public static LongBuffer nresv(long struct)
      Unsafe version of resv().
    • nresv

      public static long nresv(long struct, int index)
      Unsafe version of resv.
    • nring_addr

      public static void nring_addr(long struct, long value)
      Unsafe version of ring_addr.
    • nring_entries

      public static void nring_entries(long struct, int value)
      Unsafe version of ring_entries.
    • nbgid

      public static void nbgid(long struct, short value)
      Unsafe version of bgid.
    • nflags

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

      public static void nresv(long struct, LongBuffer value)
      Unsafe version of resv.
    • nresv

      public static void nresv(long struct, int index, long value)
      Unsafe version of resv.