Class IOURingNAPI

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class IOURingNAPI extends Struct<IOURingNAPI> implements NativeResource

 struct io_uring_napi {
     __u32 busy_poll_to;
     __u8 prefer_busy_poll;
     __u8 pad[3];
     __u64 resv;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int BUSY_POLL_TO
      The struct member offsets.
    • PREFER_BUSY_POLL

      public static final int PREFER_BUSY_POLL
      The struct member offsets.
    • PAD

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

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

    • IOURingNAPI

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

      public int busy_poll_to()
      Returns:
      the value of the busy_poll_to field.
    • prefer_busy_poll

      public byte prefer_busy_poll()
      Returns:
      the value of the prefer_busy_poll field.
    • busy_poll_to

      public IOURingNAPI busy_poll_to(int value)
      Sets the specified value to the busy_poll_to field.
    • prefer_busy_poll

      public IOURingNAPI prefer_busy_poll(byte value)
      Sets the specified value to the prefer_busy_poll field.
    • set

      public IOURingNAPI set(int busy_poll_to, byte prefer_busy_poll)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nbusy_poll_to(long struct)
      Unsafe version of busy_poll_to().
    • nprefer_busy_poll

      public static byte nprefer_busy_poll(long struct)
      Unsafe version of prefer_busy_poll().
    • npad

      public static ByteBuffer npad(long struct)
    • npad

      public static byte npad(long struct, int index)
    • nresv

      public static long nresv(long struct)
    • nbusy_poll_to

      public static void nbusy_poll_to(long struct, int value)
      Unsafe version of busy_poll_to.
    • nprefer_busy_poll

      public static void nprefer_busy_poll(long struct, byte value)
      Unsafe version of prefer_busy_poll.
    • npad

      public static void npad(long struct, ByteBuffer value)
    • npad

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

      public static void nresv(long struct, long value)