Class IOURing

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class IOURing
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

    
     struct io_uring {
         struct io_uring_sq sq;
         struct io_uring_cq cq;
         unsigned int flags;
         int ring_fd;
         unsigned int features;
         unsigned int pad[3];
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  IOURing.Buffer
      An array of IOURing structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

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

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int CQ
      FEATURES
      FLAGS
      PAD
      RING_FD
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int SQ
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

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

      Constructors 
      Constructor Description
      IOURing​(java.nio.ByteBuffer container)
      Creates a IOURing instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static IOURing calloc()
      Returns a new IOURing instance allocated with memCalloc.
      static IOURing.Buffer calloc​(int capacity)
      Returns a new IOURing.Buffer instance allocated with memCalloc.
      static IOURing.Buffer calloc​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new IOURing.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      static IOURing calloc​(org.lwjgl.system.MemoryStack stack)
      Returns a new IOURing instance allocated on the specified MemoryStack and initializes all its bits to zero.
      IOURingCQ cq()  
      IOURing cq​(java.util.function.Consumer<IOURingCQ> consumer)
      Passes the cq field to the specified Consumer.
      IOURing cq​(IOURingCQ value)
      Copies the specified IOURingCQ to the cq field.
      static IOURing create()
      Returns a new IOURing instance allocated with BufferUtils.
      static IOURing.Buffer create​(int capacity)
      Returns a new IOURing.Buffer instance allocated with BufferUtils.
      static IOURing create​(long address)
      Returns a new IOURing instance for the specified memory address.
      static IOURing.Buffer create​(long address, int capacity)
      Create a IOURing.Buffer instance at the specified memory.
      static IOURing createSafe​(long address)
      Like create, but returns null if address is NULL.
      static IOURing.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      int features()  
      IOURing features​(int value)
      Sets the specified value to the features field.
      int flags()  
      IOURing flags​(int value)
      Sets the specified value to the flags field.
      static IOURing malloc()
      Returns a new IOURing instance allocated with memAlloc.
      static IOURing.Buffer malloc​(int capacity)
      Returns a new IOURing.Buffer instance allocated with memAlloc.
      static IOURing.Buffer malloc​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new IOURing.Buffer instance allocated on the specified MemoryStack.
      static IOURing malloc​(org.lwjgl.system.MemoryStack stack)
      Returns a new IOURing instance allocated on the specified MemoryStack.
      static IOURingCQ ncq​(long struct)
      Unsafe version of cq().
      static void ncq​(long struct, IOURingCQ value)
      Unsafe version of cq.
      static int nfeatures​(long struct)
      Unsafe version of features().
      static void nfeatures​(long struct, int value)
      Unsafe version of features.
      static int nflags​(long struct)
      Unsafe version of flags().
      static void nflags​(long struct, int value)
      Unsafe version of flags.
      static java.nio.IntBuffer npad​(long struct)  
      static int npad​(long struct, int index)  
      static void npad​(long struct, int index, int value)  
      static void npad​(long struct, java.nio.IntBuffer value)  
      static int nring_fd​(long struct)
      Unsafe version of ring_fd().
      static void nring_fd​(long struct, int value)
      Unsafe version of ring_fd.
      static IOURingSQ nsq​(long struct)
      Unsafe version of sq().
      static void nsq​(long struct, IOURingSQ value)
      Unsafe version of sq.
      int ring_fd()  
      IOURing ring_fd​(int value)
      Sets the specified value to the ring_fd field.
      IOURing set​(IOURing src)
      Copies the specified struct data to this struct.
      IOURing set​(IOURingSQ sq, IOURingCQ cq, int flags, int ring_fd, int features)
      Initializes this struct with the specified values.
      int sizeof()  
      IOURingSQ sq()  
      IOURing sq​(java.util.function.Consumer<IOURingSQ> consumer)
      Passes the sq field to the specified Consumer.
      IOURing sq​(IOURingSQ value)
      Copies the specified IOURingSQ to the sq field.
      static void validate​(long struct)
      Validates pointer members that should not be NULL.
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull, validate
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SQ, CQ, FLAGS, RING_FD, FEATURES, PAD

        The struct member offsets.
    • Constructor Detail

      • IOURing

        public IOURing​(java.nio.ByteBuffer container)
        Creates a IOURing 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • flags

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

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

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

        public IOURing sq​(java.util.function.Consumer<IOURingSQ> consumer)
        Passes the sq field to the specified Consumer.
      • cq

        public IOURing cq​(java.util.function.Consumer<IOURingCQ> consumer)
        Passes the cq field to the specified Consumer.
      • flags

        public IOURing flags​(int value)
        Sets the specified value to the flags field.
      • ring_fd

        public IOURing ring_fd​(int value)
        Sets the specified value to the ring_fd field.
      • features

        public IOURing features​(int value)
        Sets the specified value to the features field.
      • set

        public IOURing set​(IOURingSQ sq,
                           IOURingCQ cq,
                           int flags,
                           int ring_fd,
                           int features)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static IOURing.Buffer calloc​(int capacity,
                                            org.lwjgl.system.MemoryStack stack)
        Returns a new IOURing.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nsq

        public static IOURingSQ nsq​(long struct)
        Unsafe version of sq().
      • ncq

        public static IOURingCQ ncq​(long struct)
        Unsafe version of cq().
      • nflags

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

        public static int nring_fd​(long struct)
        Unsafe version of ring_fd().
      • nfeatures

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

        public static java.nio.IntBuffer npad​(long struct)
      • npad

        public static int npad​(long struct,
                               int index)
      • nsq

        public static void nsq​(long struct,
                               IOURingSQ value)
        Unsafe version of sq.
      • ncq

        public static void ncq​(long struct,
                               IOURingCQ value)
        Unsafe version of cq.
      • nflags

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

        public static void nring_fd​(long struct,
                                    int value)
        Unsafe version of ring_fd.
      • nfeatures

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

        public static void npad​(long struct,
                                java.nio.IntBuffer value)
      • npad

        public static void npad​(long struct,
                                int index,
                                int value)
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate