Class IOURingBufRing

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

public class IOURingBufRing extends org.lwjgl.system.Struct<IOURingBufRing> implements org.lwjgl.system.NativeResource

Layout


 struct io_uring_buf_ring {
     union {
         struct {
             __u64 resv1;
             __u32 resv2;
             __u16 resv3;
             __u16 tail;
         };
         struct io_uring_buf bufs[0];
     };
 }
  • Field Details

    • SIZEOF

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

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

      public static final int RESV1
      The struct member offsets.
    • RESV2

      public static final int RESV2
      The struct member offsets.
    • RESV3

      public static final int RESV3
      The struct member offsets.
    • TAIL

      public static final int TAIL
      The struct member offsets.
    • BUFS

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

    • IOURingBufRing

      public IOURingBufRing(ByteBuffer container)
      Creates a IOURingBufRing 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<IOURingBufRing>
    • resv1

      public long resv1()
      Returns:
      the value of the resv1 field.
    • resv2

      public int resv2()
      Returns:
      the value of the resv2 field.
    • resv3

      public short resv3()
      Returns:
      the value of the resv3 field.
    • tail

      public short tail()
      Returns:
      the value of the tail field.
    • bufs

      public IOURingBuf.Buffer bufs()
      Returns:
      a IOURingBuf.Buffer view of the bufs field.
    • bufs

      public IOURingBuf bufs(int index)
      Returns:
      a IOURingBuf view of the struct at the specified index of the bufs field.
    • resv1

      public IOURingBufRing resv1(long value)
      Sets the specified value to the resv1 field.
    • resv2

      public IOURingBufRing resv2(int value)
      Sets the specified value to the resv2 field.
    • resv3

      public IOURingBufRing resv3(short value)
      Sets the specified value to the resv3 field.
    • tail

      public IOURingBufRing tail(short value)
      Sets the specified value to the tail field.
    • bufs

      public IOURingBufRing bufs(IOURingBuf.Buffer value)
      Copies the specified IOURingBuf.Buffer to the bufs field.
    • bufs

      public IOURingBufRing bufs(int index, IOURingBuf value)
      Copies the specified IOURingBuf at the specified index of the bufs field.
    • bufs

      public IOURingBufRing bufs(Consumer<IOURingBuf.Buffer> consumer)
      Passes the bufs field to the specified Consumer.
    • bufs

      public IOURingBufRing bufs(int index, Consumer<IOURingBuf> consumer)
      Passes the element at index of the bufs field to the specified Consumer.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nresv1(long struct)
      Unsafe version of resv1().
    • nresv2

      public static int nresv2(long struct)
      Unsafe version of resv2().
    • nresv3

      public static short nresv3(long struct)
      Unsafe version of resv3().
    • ntail

      public static short ntail(long struct)
      Unsafe version of tail().
    • nbufs

      public static IOURingBuf.Buffer nbufs(long struct)
      Unsafe version of bufs().
    • nbufs

      public static IOURingBuf nbufs(long struct, int index)
      Unsafe version of bufs.
    • nresv1

      public static void nresv1(long struct, long value)
      Unsafe version of resv1.
    • nresv2

      public static void nresv2(long struct, int value)
      Unsafe version of resv2.
    • nresv3

      public static void nresv3(long struct, short value)
      Unsafe version of resv3.
    • ntail

      public static void ntail(long struct, short value)
      Unsafe version of tail.
    • nbufs

      public static void nbufs(long struct, IOURingBuf.Buffer value)
      Unsafe version of bufs.
    • nbufs

      public static void nbufs(long struct, int index, IOURingBuf value)
      Unsafe version of bufs.