Class IOURingBuf

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

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

Layout


 struct io_uring_buf {
     __u64 addr;
     __u32 len;
     __u16 bid;
     __u16 resv;
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of IOURingBuf structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct member offsets.
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a IOURingBuf instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    addr(long value)
    Sets the specified value to the addr field.
    short
    bid()
     
    bid(short value)
    Sets the specified value to the bid field.
    static IOURingBuf
    Returns a new IOURingBuf instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new IOURingBuf.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingBuf.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static IOURingBuf
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingBuf instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static IOURingBuf
    Returns a new IOURingBuf instance allocated with BufferUtils.
    create(int capacity)
    Returns a new IOURingBuf.Buffer instance allocated with BufferUtils.
    static IOURingBuf
    create(long address)
    Returns a new IOURingBuf instance for the specified memory address.
    create(long address, int capacity)
    Create a IOURingBuf.Buffer instance at the specified memory.
    static IOURingBuf
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    int
    len()
     
    len(int value)
    Sets the specified value to the len field.
    static IOURingBuf
    Returns a new IOURingBuf instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new IOURingBuf.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingBuf.Buffer instance allocated on the specified MemoryStack.
    static IOURingBuf
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingBuf instance allocated on the specified MemoryStack.
    static long
    naddr(long struct)
    Unsafe version of addr().
    static void
    naddr(long struct, long value)
    Unsafe version of addr.
    static short
    nbid(long struct)
    Unsafe version of bid().
    static void
    nbid(long struct, short value)
    Unsafe version of bid.
    static int
    nlen(long struct)
    Unsafe version of len().
    static void
    nlen(long struct, int value)
    Unsafe version of len.
    static short
    nresv(long struct)
    Unsafe version of resv().
    static void
    nresv(long struct, short value)
    Unsafe version of resv.
    short
     
    resv(short value)
    Sets the specified value to the resv field.
    set(long addr, int len, short bid, short resv)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    int
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

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

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

      public static final int ADDR
      The struct member offsets.
    • LEN

      public static final int LEN
      The struct member offsets.
    • BID

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

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

    • IOURingBuf

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

      public long addr()
      Returns:
      the value of the addr field.
    • len

      public int len()
      Returns:
      the value of the len field.
    • bid

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

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

      public IOURingBuf addr(long value)
      Sets the specified value to the addr field.
    • len

      public IOURingBuf len(int value)
      Sets the specified value to the len field.
    • bid

      public IOURingBuf bid(short value)
      Sets the specified value to the bid field.
    • resv

      public IOURingBuf resv(short value)
      Sets the specified value to the resv field.
    • set

      public IOURingBuf set(long addr, int len, short bid, short resv)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long naddr(long struct)
      Unsafe version of addr().
    • nlen

      public static int nlen(long struct)
      Unsafe version of len().
    • nbid

      public static short nbid(long struct)
      Unsafe version of bid().
    • nresv

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

      public static void naddr(long struct, long value)
      Unsafe version of addr.
    • nlen

      public static void nlen(long struct, int value)
      Unsafe version of len.
    • nbid

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

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