Class IOURingNAPI

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

public class IOURingNAPI extends org.lwjgl.system.Struct<IOURingNAPI> implements org.lwjgl.system.NativeResource
Argument for IORING_(UN)REGISTER_NAPI.

Layout


 struct io_uring_napi {
     __u32 busy_poll_to;
     __u8 prefer_busy_poll;
     __u8 pad[3];
     __u64 resv;
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of IOURingNAPI 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 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 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 IOURingNAPI instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    busy_poll_to(int value)
    Sets the specified value to the busy_poll_to field.
    Returns a new IOURingNAPI instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new IOURingNAPI.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingNAPI.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingNAPI instance allocated on the specified MemoryStack and initializes all its bits to zero.
    Returns a new IOURingNAPI instance allocated with BufferUtils.
    create(int capacity)
    Returns a new IOURingNAPI.Buffer instance allocated with BufferUtils.
    create(long address)
    Returns a new IOURingNAPI instance for the specified memory address.
    create(long address, int capacity)
    Create a IOURingNAPI.Buffer instance at the specified memory.
    static @Nullable IOURingNAPI
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable IOURingNAPI.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    Returns a new IOURingNAPI instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new IOURingNAPI.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingNAPI.Buffer instance allocated on the specified MemoryStack.
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new IOURingNAPI instance allocated on the specified MemoryStack.
    static int
    nbusy_poll_to(long struct)
    Unsafe version of busy_poll_to().
    static void
    nbusy_poll_to(long struct, int value)
    Unsafe version of busy_poll_to.
    static ByteBuffer
    npad(long struct)
     
    static byte
    npad(long struct, int index)
     
    static void
    npad(long struct, int index, byte value)
     
    static void
    npad(long struct, ByteBuffer value)
     
    static byte
    nprefer_busy_poll(long struct)
    Unsafe version of prefer_busy_poll().
    static void
    nprefer_busy_poll(long struct, byte value)
    Unsafe version of prefer_busy_poll.
    static long
    nresv(long struct)
     
    static void
    nresv(long struct, long value)
     
    byte
     
    prefer_busy_poll(byte value)
    Sets the specified value to the prefer_busy_poll field.
    set(int busy_poll_to, byte prefer_busy_poll)
    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, 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.
    • 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()
      Specified by:
      sizeof in class org.lwjgl.system.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(org.lwjgl.system.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(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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)