Class IOURingSQE

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

    public class IOURingSQE
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    IO submission data structure (Submission Queue Entry).

    Once the submission queue entry is initialized, I/O is submitted by placing the index of the submission queue entry into the tail of the submission queue. After one or more indexes are added to the queue, and the queue tail is advanced, the enter system call can be invoked to initiate the I/O.

    Layout

    
     struct io_uring_sqe {
         __u8 opcode();
         __u8 flags();
         __u16 ioprio();
         __s32 fd();
         union {
             __u64 off();
             __u64 addr2;
         };
         union {
             __u64 addr();
             __u64 splice_off_in;
         };
         __u32 len();
         union {
             __kernel_rwf_t rw_flags();
             __u32 fsync_flags();
             __u16 poll_events();
             __u32 poll32_events();
             __u32 sync_range_flags;
             __u32 msg_flags;
             __u32 timeout_flags;
             __u32 accept_flags;
             __u32 cancel_flags;
             __u32 open_flags;
             __u32 statx_flags;
             __u32 fadvise_advice;
             __u32 splice_flags;
             __u32 rename_flags;
             __u32 unlink_flags;
             __u32 hardlink_flags;
         };
         __u64 user_data();
         union {
             __u16 buf_index();
             __u16 buf_group();
         };
         __u16 personality();
         union {
             __s32 splice_fd_in;
             __u32 file_index;
         };
         __u64 __pad2[2];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • OPCODE, FLAGS, IOPRIO, FD, OFF, ADDR2, ADDR, SPLICE_OFF_IN, LEN, RW_FLAGS, FSYNC_FLAGS, POLL_EVENTS, POLL32_EVENTS, SYNC_RANGE_FLAGS, MSG_FLAGS, TIMEOUT_FLAGS, ACCEPT_FLAGS, CANCEL_FLAGS, OPEN_FLAGS, STATX_FLAGS, FADVISE_ADVICE, SPLICE_FLAGS, RENAME_FLAGS, UNLINK_FLAGS, HARDLINK_FLAGS, USER_DATA, BUF_INDEX, BUF_GROUP, PERSONALITY, SPLICE_FD_IN, FILE_INDEX, __PAD2

        The struct member offsets.
    • Constructor Detail

      • IOURingSQE

        public IOURingSQE​(java.nio.ByteBuffer container)
        Creates a IOURingSQE 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
      • opcode

        public byte opcode()
        type of operation for this sqe
      • ioprio

        public short ioprio()
        specifies the I/O priority. See ioprio_get(2) for a description of Linux I/O priorities.
      • fd

        public int fd()
        specifies the file descriptor against which the operation will be performed
      • off

        public long off()
        offset into file
      • addr2

        public long addr2()
        Returns:
        the value of the addr2 field.
      • addr

        public long addr()
        pointer to buffer or iovecs
      • splice_off_in

        public long splice_off_in()
        Returns:
        the value of the splice_off_in field.
      • len

        public int len()
        buffer size or number of iovecs
      • rw_flags

        public int rw_flags()
        specified for read and write operations, contains a bitwise OR of per-I/O flags, as described in the preadv2(2) man page
      • fsync_flags

        public int fsync_flags()
        may contain either 0, for a normal file integrity sync, or FSYNC_DATASYNC to provide data sync only semantics.

        See the descriptions of O_SYNC and O_DSYNC in the open(2) manual page for more information.

      • poll_events

        public short poll_events()
        the bits that may be set in poll_events are defined in <poll.h>, and documented in poll(2)
      • poll32_events

        public int poll32_events()
        word-reversed for BE
      • sync_range_flags

        public int sync_range_flags()
        Returns:
        the value of the sync_range_flags field.
      • msg_flags

        public int msg_flags()
        Returns:
        the value of the msg_flags field.
      • timeout_flags

        public int timeout_flags()
        Returns:
        the value of the timeout_flags field.
      • accept_flags

        public int accept_flags()
        Returns:
        the value of the accept_flags field.
      • cancel_flags

        public int cancel_flags()
        Returns:
        the value of the cancel_flags field.
      • open_flags

        public int open_flags()
        Returns:
        the value of the open_flags field.
      • statx_flags

        public int statx_flags()
        Returns:
        the value of the statx_flags field.
      • fadvise_advice

        public int fadvise_advice()
        Returns:
        the value of the fadvise_advice field.
      • splice_flags

        public int splice_flags()
        Returns:
        the value of the splice_flags field.
      • rename_flags

        public int rename_flags()
        Returns:
        the value of the rename_flags field.
      • unlink_flags

        public int unlink_flags()
        Returns:
        the value of the unlink_flags field.
      • hardlink_flags

        public int hardlink_flags()
        Returns:
        the value of the hardlink_flags field.
      • user_data

        public long user_data()
        an application-supplied value that will be copied into the completion queue entry
      • buf_index

        public short buf_index()
        an index into an array of fixed buffers, and is only valid if fixed buffers were registered
      • buf_group

        public short buf_group()
        for grouped buffer selection
      • personality

        public short personality()
        the credentials id to use for this operation.

        See register for how to register personalities with io_uring. If set to 0, the current personality of the submitting task is used.

      • splice_fd_in

        public int splice_fd_in()
        Returns:
        the value of the splice_fd_in field.
      • file_index

        public int file_index()
        Returns:
        the value of the file_index field.
      • opcode

        public IOURingSQE opcode​(byte value)
        Sets the specified value to the opcode() field.
      • flags

        public IOURingSQE flags​(byte value)
        Sets the specified value to the flags() field.
      • ioprio

        public IOURingSQE ioprio​(short value)
        Sets the specified value to the ioprio() field.
      • fd

        public IOURingSQE fd​(int value)
        Sets the specified value to the fd() field.
      • off

        public IOURingSQE off​(long value)
        Sets the specified value to the off() field.
      • addr2

        public IOURingSQE addr2​(long value)
        Sets the specified value to the addr2 field.
      • addr

        public IOURingSQE addr​(long value)
        Sets the specified value to the addr() field.
      • splice_off_in

        public IOURingSQE splice_off_in​(long value)
        Sets the specified value to the splice_off_in field.
      • len

        public IOURingSQE len​(int value)
        Sets the specified value to the len() field.
      • rw_flags

        public IOURingSQE rw_flags​(int value)
        Sets the specified value to the rw_flags() field.
      • poll_events

        public IOURingSQE poll_events​(short value)
        Sets the specified value to the poll_events() field.
      • sync_range_flags

        public IOURingSQE sync_range_flags​(int value)
        Sets the specified value to the sync_range_flags field.
      • msg_flags

        public IOURingSQE msg_flags​(int value)
        Sets the specified value to the msg_flags field.
      • timeout_flags

        public IOURingSQE timeout_flags​(int value)
        Sets the specified value to the timeout_flags field.
      • accept_flags

        public IOURingSQE accept_flags​(int value)
        Sets the specified value to the accept_flags field.
      • cancel_flags

        public IOURingSQE cancel_flags​(int value)
        Sets the specified value to the cancel_flags field.
      • open_flags

        public IOURingSQE open_flags​(int value)
        Sets the specified value to the open_flags field.
      • statx_flags

        public IOURingSQE statx_flags​(int value)
        Sets the specified value to the statx_flags field.
      • fadvise_advice

        public IOURingSQE fadvise_advice​(int value)
        Sets the specified value to the fadvise_advice field.
      • splice_flags

        public IOURingSQE splice_flags​(int value)
        Sets the specified value to the splice_flags field.
      • rename_flags

        public IOURingSQE rename_flags​(int value)
        Sets the specified value to the rename_flags field.
      • unlink_flags

        public IOURingSQE unlink_flags​(int value)
        Sets the specified value to the unlink_flags field.
      • hardlink_flags

        public IOURingSQE hardlink_flags​(int value)
        Sets the specified value to the hardlink_flags field.
      • user_data

        public IOURingSQE user_data​(long value)
        Sets the specified value to the user_data() field.
      • buf_index

        public IOURingSQE buf_index​(short value)
        Sets the specified value to the buf_index() field.
      • buf_group

        public IOURingSQE buf_group​(short value)
        Sets the specified value to the buf_group() field.
      • personality

        public IOURingSQE personality​(short value)
        Sets the specified value to the personality() field.
      • splice_fd_in

        public IOURingSQE splice_fd_in​(int value)
        Sets the specified value to the splice_fd_in field.
      • file_index

        public IOURingSQE file_index​(int value)
        Sets the specified value to the file_index field.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static IOURingSQE.Buffer calloc​(int capacity,
                                               org.lwjgl.system.MemoryStack stack)
        Returns a new IOURingSQE.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
      • nopcode

        public static byte nopcode​(long struct)
        Unsafe version of opcode().
      • nflags

        public static byte nflags​(long struct)
        Unsafe version of flags().
      • nioprio

        public static short nioprio​(long struct)
        Unsafe version of ioprio().
      • nfd

        public static int nfd​(long struct)
        Unsafe version of fd().
      • noff

        public static long noff​(long struct)
        Unsafe version of off().
      • naddr2

        public static long naddr2​(long struct)
        Unsafe version of addr2().
      • naddr

        public static long naddr​(long struct)
        Unsafe version of addr().
      • nsplice_off_in

        public static long nsplice_off_in​(long struct)
        Unsafe version of splice_off_in().
      • nlen

        public static int nlen​(long struct)
        Unsafe version of len().
      • nrw_flags

        public static int nrw_flags​(long struct)
        Unsafe version of rw_flags().
      • nfsync_flags

        public static int nfsync_flags​(long struct)
        Unsafe version of fsync_flags().
      • npoll_events

        public static short npoll_events​(long struct)
        Unsafe version of poll_events().
      • npoll32_events

        public static int npoll32_events​(long struct)
        Unsafe version of poll32_events().
      • nsync_range_flags

        public static int nsync_range_flags​(long struct)
        Unsafe version of sync_range_flags().
      • nmsg_flags

        public static int nmsg_flags​(long struct)
        Unsafe version of msg_flags().
      • ntimeout_flags

        public static int ntimeout_flags​(long struct)
        Unsafe version of timeout_flags().
      • naccept_flags

        public static int naccept_flags​(long struct)
        Unsafe version of accept_flags().
      • ncancel_flags

        public static int ncancel_flags​(long struct)
        Unsafe version of cancel_flags().
      • nopen_flags

        public static int nopen_flags​(long struct)
        Unsafe version of open_flags().
      • nstatx_flags

        public static int nstatx_flags​(long struct)
        Unsafe version of statx_flags().
      • nfadvise_advice

        public static int nfadvise_advice​(long struct)
        Unsafe version of fadvise_advice().
      • nsplice_flags

        public static int nsplice_flags​(long struct)
        Unsafe version of splice_flags().
      • nrename_flags

        public static int nrename_flags​(long struct)
        Unsafe version of rename_flags().
      • nunlink_flags

        public static int nunlink_flags​(long struct)
        Unsafe version of unlink_flags().
      • nhardlink_flags

        public static int nhardlink_flags​(long struct)
        Unsafe version of hardlink_flags().
      • nuser_data

        public static long nuser_data​(long struct)
        Unsafe version of user_data().
      • nbuf_index

        public static short nbuf_index​(long struct)
        Unsafe version of buf_index().
      • nbuf_group

        public static short nbuf_group​(long struct)
        Unsafe version of buf_group().
      • npersonality

        public static short npersonality​(long struct)
        Unsafe version of personality().
      • nsplice_fd_in

        public static int nsplice_fd_in​(long struct)
        Unsafe version of splice_fd_in().
      • nfile_index

        public static int nfile_index​(long struct)
        Unsafe version of file_index().
      • n__pad2

        public static java.nio.LongBuffer n__pad2​(long struct)
      • n__pad2

        public static long n__pad2​(long struct,
                                   int index)
      • nopcode

        public static void nopcode​(long struct,
                                   byte value)
        Unsafe version of opcode.
      • nflags

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

        public static void nioprio​(long struct,
                                   short value)
        Unsafe version of ioprio.
      • nfd

        public static void nfd​(long struct,
                               int value)
        Unsafe version of fd.
      • noff

        public static void noff​(long struct,
                                long value)
        Unsafe version of off.
      • naddr2

        public static void naddr2​(long struct,
                                  long value)
        Unsafe version of addr2.
      • naddr

        public static void naddr​(long struct,
                                 long value)
        Unsafe version of addr.
      • nsplice_off_in

        public static void nsplice_off_in​(long struct,
                                          long value)
        Unsafe version of splice_off_in.
      • nlen

        public static void nlen​(long struct,
                                int value)
        Unsafe version of len.
      • nrw_flags

        public static void nrw_flags​(long struct,
                                     int value)
        Unsafe version of rw_flags.
      • nfsync_flags

        public static void nfsync_flags​(long struct,
                                        int value)
        Unsafe version of fsync_flags.
      • npoll_events

        public static void npoll_events​(long struct,
                                        short value)
        Unsafe version of poll_events.
      • npoll32_events

        public static void npoll32_events​(long struct,
                                          int value)
        Unsafe version of poll32_events.
      • nsync_range_flags

        public static void nsync_range_flags​(long struct,
                                             int value)
        Unsafe version of sync_range_flags.
      • nmsg_flags

        public static void nmsg_flags​(long struct,
                                      int value)
        Unsafe version of msg_flags.
      • ntimeout_flags

        public static void ntimeout_flags​(long struct,
                                          int value)
        Unsafe version of timeout_flags.
      • naccept_flags

        public static void naccept_flags​(long struct,
                                         int value)
        Unsafe version of accept_flags.
      • ncancel_flags

        public static void ncancel_flags​(long struct,
                                         int value)
        Unsafe version of cancel_flags.
      • nopen_flags

        public static void nopen_flags​(long struct,
                                       int value)
        Unsafe version of open_flags.
      • nstatx_flags

        public static void nstatx_flags​(long struct,
                                        int value)
        Unsafe version of statx_flags.
      • nfadvise_advice

        public static void nfadvise_advice​(long struct,
                                           int value)
        Unsafe version of fadvise_advice.
      • nsplice_flags

        public static void nsplice_flags​(long struct,
                                         int value)
        Unsafe version of splice_flags.
      • nrename_flags

        public static void nrename_flags​(long struct,
                                         int value)
        Unsafe version of rename_flags.
      • nunlink_flags

        public static void nunlink_flags​(long struct,
                                         int value)
        Unsafe version of unlink_flags.
      • nhardlink_flags

        public static void nhardlink_flags​(long struct,
                                           int value)
        Unsafe version of hardlink_flags.
      • nuser_data

        public static void nuser_data​(long struct,
                                      long value)
        Unsafe version of user_data.
      • nbuf_index

        public static void nbuf_index​(long struct,
                                      short value)
        Unsafe version of buf_index.
      • nbuf_group

        public static void nbuf_group​(long struct,
                                      short value)
        Unsafe version of buf_group.
      • npersonality

        public static void npersonality​(long struct,
                                        short value)
        Unsafe version of personality.
      • nsplice_fd_in

        public static void nsplice_fd_in​(long struct,
                                         int value)
        Unsafe version of splice_fd_in.
      • nfile_index

        public static void nfile_index​(long struct,
                                       int value)
        Unsafe version of file_index.
      • n__pad2

        public static void n__pad2​(long struct,
                                   java.nio.LongBuffer value)
      • n__pad2

        public static void n__pad2​(long struct,
                                   int index,
                                   long value)