Class IOURingBufStatus

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class IOURingBufStatus extends Struct<IOURingBufStatus> implements NativeResource

 struct io_uring_buf_status {
     __u32 buf_group;
     __u32 head;
     __u32 resv[8];
 }
  • Field Details

    • SIZEOF

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

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

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

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

    • IOURingBufStatus

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

      public int buf_group()
      Returns:
      the value of the buf_group field.
    • head

      public int head()
      Returns:
      the value of the head field.
    • buf_group

      public IOURingBufStatus buf_group(int value)
      Sets the specified value to the buf_group field.
    • head

      public IOURingBufStatus head(int value)
      Sets the specified value to the head field.
    • set

      public IOURingBufStatus set(int buf_group, int head)
      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 IOURingBufStatus malloc()
      Returns a new IOURingBufStatus instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static IOURingBufStatus.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new IOURingBufStatus.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
    • nbuf_group

      public static int nbuf_group(long struct)
      Unsafe version of buf_group().
    • nhead

      public static int nhead(long struct)
      Unsafe version of head().
    • nresv

      public static IntBuffer nresv(long struct)
    • nresv

      public static int nresv(long struct, int index)
    • nbuf_group

      public static void nbuf_group(long struct, int value)
      Unsafe version of buf_group.
    • nhead

      public static void nhead(long struct, int value)
      Unsafe version of head.
    • nresv

      public static void nresv(long struct, IntBuffer value)
    • nresv

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