Class IOURingParams

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class IOURingParams extends Struct<IOURingParams> implements NativeResource

 struct io_uring_params {
     __u32 sq_entries;
     __u32 cq_entries;
     __u32 flags;
     __u32 sq_thread_cpu;
     __u32 sq_thread_idle;
     __u32 features;
     __u32 wq_fd;
     __u32 resv[3];
     {@link IOSQRingOffsets struct io_sqring_offsets} sq_off;
     {@link IOCQRingOffsets struct io_cqring_offsets} cq_off;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int SQ_ENTRIES
      The struct member offsets.
    • CQ_ENTRIES

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

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

      public static final int SQ_THREAD_CPU
      The struct member offsets.
    • SQ_THREAD_IDLE

      public static final int SQ_THREAD_IDLE
      The struct member offsets.
    • FEATURES

      public static final int FEATURES
      The struct member offsets.
    • WQ_FD

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

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

      public static final int SQ_OFF
      The struct member offsets.
    • CQ_OFF

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

    • IOURingParams

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

      public int sq_entries()
      Returns:
      the value of the sq_entries field.
    • cq_entries

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

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

      public int sq_thread_cpu()
      Returns:
      the value of the sq_thread_cpu field.
    • sq_thread_idle

      public int sq_thread_idle()
      Returns:
      the value of the sq_thread_idle field.
    • features

      public int features()
      Returns:
      the value of the features field.
    • wq_fd

      public int wq_fd()
      Returns:
      the value of the wq_fd field.
    • sq_off

      public IOSQRingOffsets sq_off()
      Returns:
      a IOSQRingOffsets view of the sq_off field.
    • cq_off

      public IOCQRingOffsets cq_off()
      Returns:
      a IOCQRingOffsets view of the cq_off field.
    • sq_entries

      public IOURingParams sq_entries(int value)
      Sets the specified value to the sq_entries field.
    • cq_entries

      public IOURingParams cq_entries(int value)
      Sets the specified value to the cq_entries field.
    • flags

      public IOURingParams flags(int value)
      Sets the specified value to the flags field.
    • sq_thread_cpu

      public IOURingParams sq_thread_cpu(int value)
      Sets the specified value to the sq_thread_cpu field.
    • sq_thread_idle

      public IOURingParams sq_thread_idle(int value)
      Sets the specified value to the sq_thread_idle field.
    • features

      public IOURingParams features(int value)
      Sets the specified value to the features field.
    • wq_fd

      public IOURingParams wq_fd(int value)
      Sets the specified value to the wq_fd field.
    • sq_off

      public IOURingParams sq_off(IOSQRingOffsets value)
      Copies the specified IOSQRingOffsets to the sq_off field.
    • sq_off

      public IOURingParams sq_off(Consumer<IOSQRingOffsets> consumer)
      Passes the sq_off field to the specified Consumer.
    • cq_off

      public IOURingParams cq_off(IOCQRingOffsets value)
      Copies the specified IOCQRingOffsets to the cq_off field.
    • cq_off

      public IOURingParams cq_off(Consumer<IOCQRingOffsets> consumer)
      Passes the cq_off field to the specified Consumer.
    • set

      public IOURingParams set(int sq_entries, int cq_entries, int flags, int sq_thread_cpu, int sq_thread_idle, int features, int wq_fd, IOSQRingOffsets sq_off, IOCQRingOffsets cq_off)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nsq_entries(long struct)
      Unsafe version of sq_entries().
    • ncq_entries

      public static int ncq_entries(long struct)
      Unsafe version of cq_entries().
    • nflags

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

      public static int nsq_thread_cpu(long struct)
      Unsafe version of sq_thread_cpu().
    • nsq_thread_idle

      public static int nsq_thread_idle(long struct)
      Unsafe version of sq_thread_idle().
    • nfeatures

      public static int nfeatures(long struct)
      Unsafe version of features().
    • nwq_fd

      public static int nwq_fd(long struct)
      Unsafe version of wq_fd().
    • nresv

      public static IntBuffer nresv(long struct)
    • nresv

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

      public static IOSQRingOffsets nsq_off(long struct)
      Unsafe version of sq_off().
    • ncq_off

      public static IOCQRingOffsets ncq_off(long struct)
      Unsafe version of cq_off().
    • nsq_entries

      public static void nsq_entries(long struct, int value)
      Unsafe version of sq_entries.
    • ncq_entries

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

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

      public static void nsq_thread_cpu(long struct, int value)
      Unsafe version of sq_thread_cpu.
    • nsq_thread_idle

      public static void nsq_thread_idle(long struct, int value)
      Unsafe version of sq_thread_idle.
    • nfeatures

      public static void nfeatures(long struct, int value)
      Unsafe version of features.
    • nwq_fd

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

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

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

      public static void nsq_off(long struct, IOSQRingOffsets value)
      Unsafe version of sq_off.
    • ncq_off

      public static void ncq_off(long struct, IOCQRingOffsets value)
      Unsafe version of cq_off.