Package org.lwjgl.system.linux.liburing
Class IOURingCQE
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<IOURingCQE>
org.lwjgl.system.linux.liburing.IOURingCQE
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class IOURingCQE
extends org.lwjgl.system.Struct<IOURingCQE>
implements org.lwjgl.system.NativeResource
IO completion data structure (Completion Queue Entry).
Layout
struct io_uring_cqe {
__u64 user_data()
;
__s32 res()
;
__u32 flags()
;
__u64 big_cqe()
[0];
}
-
Nested Class Summary
Nested ClassesNested 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
FieldsModifier and TypeFieldDescriptionstatic 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 size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionIOURingCQE
(ByteBuffer container) Creates aIOURingCQE
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionbig_cqe()
If the ring is initialized withSETUP_CQE32
, then this field contains 16-bytes of padding, doubling the size of the CQE.long
big_cqe
(int index) If the ring is initialized withSETUP_CQE32
, then this field contains 16-bytes of padding, doubling the size of the CQE.big_cqe
(int index, long value) Sets the specified value at the specified index of thebig_cqe()
field.big_cqe
(LongBuffer value) Copies the specifiedLongBuffer
to thebig_cqe()
field.static IOURingCQE
calloc()
Returns a newIOURingCQE
instance allocated withmemCalloc
.static IOURingCQE.Buffer
calloc
(int capacity) Returns a newIOURingCQE.Buffer
instance allocated withmemCalloc
.static IOURingCQE.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newIOURingCQE.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IOURingCQE
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newIOURingCQE
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IOURingCQE
create()
Returns a newIOURingCQE
instance allocated withBufferUtils
.static IOURingCQE.Buffer
create
(int capacity) Returns a newIOURingCQE.Buffer
instance allocated withBufferUtils
.static IOURingCQE
create
(long address) Returns a newIOURingCQE
instance for the specified memory address.static IOURingCQE.Buffer
create
(long address, int capacity) Create aIOURingCQE.Buffer
instance at the specified memory.static IOURingCQE
createSafe
(long address) static IOURingCQE.Buffer
createSafe
(long address, int capacity) int
flags()
is used for certain commands, likeOP_POLL_ADD
or in conjunction withLibIOURing.IOSQE_BUFFER_SELECT
, see those entriesflags
(int value) Sets the specified value to theflags()
field.static IOURingCQE
malloc()
Returns a newIOURingCQE
instance allocated withmemAlloc
.static IOURingCQE.Buffer
malloc
(int capacity) Returns a newIOURingCQE.Buffer
instance allocated withmemAlloc
.static IOURingCQE.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newIOURingCQE.Buffer
instance allocated on the specifiedMemoryStack
.static IOURingCQE
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newIOURingCQE
instance allocated on the specifiedMemoryStack
.static LongBuffer
nbig_cqe
(long struct) Unsafe version ofbig_cqe()
.static long
nbig_cqe
(long struct, int index) Unsafe version ofbig_cqe
.static void
nbig_cqe
(long struct, int index, long value) Unsafe version ofbig_cqe
.static void
nbig_cqe
(long struct, LongBuffer value) Unsafe version ofbig_cqe
.static int
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, int value) Unsafe version offlags
.static int
nres
(long struct) Unsafe version ofres()
.static void
nres
(long struct, int value) Unsafe version ofres
.static long
nuser_data
(long struct) Unsafe version ofuser_data()
.static void
nuser_data
(long struct, long value) Unsafe version ofuser_data
.int
res()
is the operation-specific result, butio_uring
-specific errors (e.g.res
(int value) Sets the specified value to theres()
field.set
(long user_data, int res, int flags, LongBuffer big_cqe) Initializes this struct with the specified values.set
(IOURingCQE src) Copies the specified struct data to this struct.int
sizeof()
long
is copied from the field of the same name in the submission queue entry.user_data
(long value) Sets the specified value to theuser_data()
field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
USER_DATA
public static final int USER_DATAThe struct member offsets. -
RES
public static final int RESThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
BIG_CQE
public static final int BIG_CQEThe struct member offsets.
-
-
Constructor Details
-
IOURingCQE
Creates aIOURingCQE
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct<IOURingCQE>
-
user_data
public long user_data()is copied from the field of the same name in the submission queue entry.The primary use case is to store data that the application will need to access upon completion of this particular I/O.
-
res
public int res()is the operation-specific result, butio_uring
-specific errors (e.g.flags
oropcode
invalid) are returned through this field.For read and write
opcodes
, the return values matcherrno
values documented in thepreadv2(2)
andpwritev2(2)
man pages, withres
holding the equivalent of-errno
for error cases, or the transferred number of bytes in case the operation is successful. Hence both error and success return can be found in that field in the CQE. For other request types, the return values are documented in the matching man page for that type, or in theopcodes
section forio_uring
-specificopcodes
. -
flags
public int flags()is used for certain commands, likeOP_POLL_ADD
or in conjunction withLibIOURing.IOSQE_BUFFER_SELECT
, see those entries -
big_cqe
If the ring is initialized withSETUP_CQE32
, then this field contains 16-bytes of padding, doubling the size of the CQE. -
big_cqe
public long big_cqe(int index) If the ring is initialized withSETUP_CQE32
, then this field contains 16-bytes of padding, doubling the size of the CQE. -
user_data
Sets the specified value to theuser_data()
field. -
res
Sets the specified value to theres()
field. -
flags
Sets the specified value to theflags()
field. -
big_cqe
Copies the specifiedLongBuffer
to thebig_cqe()
field. -
big_cqe
Sets the specified value at the specified index of thebig_cqe()
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newIOURingCQE
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newIOURingCQE
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newIOURingCQE
instance allocated withBufferUtils
. -
create
Returns a newIOURingCQE
instance for the specified memory address. -
createSafe
-
malloc
Returns a newIOURingCQE.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newIOURingCQE.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newIOURingCQE.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aIOURingCQE.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newIOURingCQE
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newIOURingCQE
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newIOURingCQE.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newIOURingCQE.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nuser_data
public static long nuser_data(long struct) Unsafe version ofuser_data()
. -
nres
public static int nres(long struct) Unsafe version ofres()
. -
nflags
public static int nflags(long struct) Unsafe version offlags()
. -
nbig_cqe
Unsafe version ofbig_cqe()
. -
nbig_cqe
public static long nbig_cqe(long struct, int index) Unsafe version ofbig_cqe
. -
nuser_data
public static void nuser_data(long struct, long value) Unsafe version ofuser_data
. -
nres
public static void nres(long struct, int value) Unsafe version ofres
. -
nflags
public static void nflags(long struct, int value) Unsafe version offlags
. -
nbig_cqe
Unsafe version ofbig_cqe
. -
nbig_cqe
public static void nbig_cqe(long struct, int index, long value) Unsafe version ofbig_cqe
.
-