Top Description Inners Fields Constructors Methods
org.lwjgl.system.linux.liburing

public Class IOURingCQE

extends Struct<IOURingCQE>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct io_uring_cqe
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

IO completion data structure (Completion Queue Entry).

Layout


struct io_uring_cqe {
    __u64 user_data;
    __s32 res;
    __u32 flags;
    __u64 big_cqe[0];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
IOURingCQE.Buffer

An array of IOURingCQE structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BIG_CQE

The struct member offsets.

public static final int
FLAGS

The struct member offsets.

public static final int
RES

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
USER_DATA

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
IOURingCQE(long address, ByteBuffer container)

public
IOURingCQE(ByteBuffer container)

Creates a IOURingCQE instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public LongBuffer
big_cqe()

If the ring is initialized with SETUP_CQE32, then this field contains 16-bytes of padding, doubling the size of the CQE.

public long
big_cqe(int index)

If the ring is initialized with SETUP_CQE32, then this field contains 16-bytes of padding, doubling the size of the CQE.

public IOURingCQE
big_cqe(LongBuffer value)

Copies the specified LongBuffer to the big_cqe field.

public IOURingCQE
big_cqe(int index, long value)

Sets the specified value at the specified index of the big_cqe field.

public static IOURingCQE
calloc()

Returns a new IOURingCQE instance allocated with memCalloc.

public static IOURingCQE.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new IOURingCQE.Buffer instance allocated with memCalloc.

public static IOURingCQE
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new IOURingCQE instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static IOURingCQE.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new IOURingCQE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected IOURingCQE
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static IOURingCQE
create()

Returns a new IOURingCQE instance allocated with BufferUtils.

public static IOURingCQE
create(long address)

Returns a new IOURingCQE instance for the specified memory address.

public static IOURingCQE.Buffer
create(int
the buffer capacity
capacity
)

Returns a new IOURingCQE.Buffer instance allocated with BufferUtils.

public static IOURingCQE.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a IOURingCQE.Buffer instance at the specified memory.

public static IOURingCQE
createSafe(long address)

Like create, but returns null if address is NULL.

public static IOURingCQE.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
flags()

is used for certain commands, like OP_POLL_ADD or in conjunction with LibIOURing#IOSQE_BUFFER_SELECT, see those entries

public IOURingCQE
flags(int value)

Sets the specified value to the flags field.

public static IOURingCQE
malloc()

Returns a new IOURingCQE instance allocated with memAlloc.

public static IOURingCQE.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new IOURingCQE.Buffer instance allocated with memAlloc.

public static IOURingCQE
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new IOURingCQE instance allocated on the specified MemoryStack.

public static IOURingCQE.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new IOURingCQE.Buffer instance allocated on the specified MemoryStack.

public static LongBuffer
nbig_cqe(long struct)

Unsafe version of big_cqe.

public static long
nbig_cqe(long struct, int index)

Unsafe version of big_cqe.

public static void
nbig_cqe(long struct, LongBuffer value)

Unsafe version of big_cqe.

public static void
nbig_cqe(long struct, int index, long value)

Unsafe version of big_cqe.

public static int
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, int value)

Unsafe version of flags.

public static int
nres(long struct)

Unsafe version of res.

public static void
nres(long struct, int value)

Unsafe version of res.

public static long
nuser_data(long struct)

Unsafe version of user_data.

public static void
nuser_data(long struct, long value)

Unsafe version of user_data.

public int
res()

is the operation-specific result, but io_uring-specific errors (e.g. flags or opcode invalid) are returned through this field.

public IOURingCQE
res(int value)

Sets the specified value to the res field.

public IOURingCQE
set(long user_data, int res, int flags, LongBuffer big_cqe)

Initializes this struct with the specified values.

public IOURingCQE

Returns:

this struct
set
(IOURingCQE
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public long
user_data()

is copied from the field of the same name in the submission queue entry.

public IOURingCQE
user_data(long value)

Sets the specified value to the user_data field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

BIG_CQEback to summary
public static final int BIG_CQE

The struct member offsets.

FLAGSback to summary
public static final int FLAGS

The struct member offsets.

RESback to summary
public static final int RES

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

USER_DATAback to summary
public static final int USER_DATA

The struct member offsets.

Constructor Detail

IOURingCQEback to summary
protected IOURingCQE(long address, ByteBuffer container)
IOURingCQEback to summary
public IOURingCQE(ByteBuffer container)

Creates a IOURingCQE 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

big_cqeback to summary
public LongBuffer big_cqe()

If the ring is initialized with SETUP_CQE32, then this field contains 16-bytes of padding, doubling the size of the CQE.

Annotations
@NativeType:__u64[0]
big_cqeback to summary
public long big_cqe(int index)

If the ring is initialized with SETUP_CQE32, then this field contains 16-bytes of padding, doubling the size of the CQE.

Annotations
@NativeType:__u64
big_cqeback to summary
public IOURingCQE big_cqe(LongBuffer value)

Copies the specified LongBuffer to the big_cqe field.

big_cqeback to summary
public IOURingCQE big_cqe(int index, long value)

Sets the specified value at the specified index of the big_cqe field.

callocback to summary
public static IOURingCQE calloc()

Returns a new IOURingCQE instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static IOURingCQE.Buffer calloc(int capacity)

Returns a new IOURingCQE.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static IOURingCQE calloc(MemoryStack stack)

Returns a new IOURingCQE instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static IOURingCQE.Buffer calloc(int capacity, MemoryStack stack)

Returns a new IOURingCQE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected IOURingCQE create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static IOURingCQE create()

Returns a new IOURingCQE instance allocated with BufferUtils.

createback to summary
public static IOURingCQE create(long address)

Returns a new IOURingCQE instance for the specified memory address.

createback to summary
public static IOURingCQE.Buffer create(int capacity)

Returns a new IOURingCQE.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static IOURingCQE.Buffer create(long address, int capacity)

Create a IOURingCQE.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static IOURingCQE createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static IOURingCQE.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
flagsback to summary
public int flags()

is used for certain commands, like OP_POLL_ADD or in conjunction with LibIOURing#IOSQE_BUFFER_SELECT, see those entries

Annotations
@NativeType:__u32
flagsback to summary
public IOURingCQE flags(int value)

Sets the specified value to the flags field.

mallocback to summary
public static IOURingCQE malloc()

Returns a new IOURingCQE instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static IOURingCQE.Buffer malloc(int capacity)

Returns a new IOURingCQE.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static IOURingCQE malloc(MemoryStack stack)

Returns a new IOURingCQE instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static IOURingCQE.Buffer malloc(int capacity, MemoryStack stack)

Returns a new IOURingCQE.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nbig_cqeback to summary
public static LongBuffer nbig_cqe(long struct)

Unsafe version of big_cqe.

nbig_cqeback to summary
public static long nbig_cqe(long struct, int index)

Unsafe version of big_cqe.

nbig_cqeback to summary
public static void nbig_cqe(long struct, LongBuffer value)

Unsafe version of big_cqe.

nbig_cqeback to summary
public static void nbig_cqe(long struct, int index, long value)

Unsafe version of big_cqe.

nflagsback to summary
public static int nflags(long struct)

Unsafe version of flags.

nflagsback to summary
public static void nflags(long struct, int value)

Unsafe version of flags.

nresback to summary
public static int nres(long struct)

Unsafe version of res.

nresback to summary
public static void nres(long struct, int value)

Unsafe version of res.

nuser_databack to summary
public static long nuser_data(long struct)

Unsafe version of user_data.

nuser_databack to summary
public static void nuser_data(long struct, long value)

Unsafe version of user_data.

resback to summary
public int res()

is the operation-specific result, but io_uring-specific errors (e.g. flags or opcode invalid) are returned through this field.

For read and write opcodes, the return values match errno values documented in the preadv2(2) and pwritev2(2) man pages, with res 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 the opcodes section for io_uring-specific opcodes.

Annotations
@NativeType:__s32
resback to summary
public IOURingCQE res(int value)

Sets the specified value to the res field.

setback to summary
public IOURingCQE set(long user_data, int res, int flags, LongBuffer big_cqe)

Initializes this struct with the specified values.

setback to summary
public IOURingCQE set(IOURingCQE src)

Copies the specified struct data to this struct.

Parameters
src:IOURingCQE

the source struct

Returns:IOURingCQE

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
user_databack to summary
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.

Annotations
@NativeType:__u64
user_databack to summary
public IOURingCQE user_data(long value)

Sets the specified value to the user_data field.

org.lwjgl.system.linux.liburing back to summary

public Class IOURingCQE.Buffer

extends StructBuffer<IOURingCQE, IOURingCQE.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of IOURingCQE structs.

Field Summary

Modifier and TypeField and Description
private static final IOURingCQE

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new IOURingCQE.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
public LongBuffer

Returns:

a LongBuffer view of the IOURingCQE#big_cqe field.
big_cqe
()

public long

Returns:

the value at the specified index of the IOURingCQE#big_cqe field.
big_cqe
(int index)

public IOURingCQE.Buffer
big_cqe(LongBuffer value)

Copies the specified LongBuffer to the IOURingCQE#big_cqe field.

public IOURingCQE.Buffer
big_cqe(int index, long value)

Sets the specified value at the specified index of the IOURingCQE#big_cqe field.

public int

Returns:

the value of the IOURingCQE#flags field.
flags
()

public IOURingCQE.Buffer
flags(int value)

Sets the specified value to the IOURingCQE#flags field.

protected IOURingCQE
public int

Returns:

the value of the IOURingCQE#res field.
res
()

public IOURingCQE.Buffer
res(int value)

Sets the specified value to the IOURingCQE#res field.

protected IOURingCQE.Buffer
public long

Returns:

the value of the IOURingCQE#user_data field.
user_data
()

public IOURingCQE.Buffer
user_data(long value)

Sets the specified value to the IOURingCQE#user_data field.

Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final IOURingCQE ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new IOURingCQE.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by IOURingCQE#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

big_cqeback to summary
public LongBuffer big_cqe()
Returns:LongBuffer

a LongBuffer view of the IOURingCQE#big_cqe field.

Annotations
@NativeType:__u64[0]
big_cqeback to summary
public long big_cqe(int index)
Returns:long

the value at the specified index of the IOURingCQE#big_cqe field.

Annotations
@NativeType:__u64
big_cqeback to summary
public IOURingCQE.Buffer big_cqe(LongBuffer value)

Copies the specified LongBuffer to the IOURingCQE#big_cqe field.

big_cqeback to summary
public IOURingCQE.Buffer big_cqe(int index, long value)

Sets the specified value at the specified index of the IOURingCQE#big_cqe field.

flagsback to summary
public int flags()
Returns:int

the value of the IOURingCQE#flags field.

Annotations
@NativeType:__u32
flagsback to summary
public IOURingCQE.Buffer flags(int value)

Sets the specified value to the IOURingCQE#flags field.

getElementFactoryback to summary
protected IOURingCQE getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
resback to summary
public int res()
Returns:int

the value of the IOURingCQE#res field.

Annotations
@NativeType:__s32
resback to summary
public IOURingCQE.Buffer res(int value)

Sets the specified value to the IOURingCQE#res field.

selfback to summary
protected IOURingCQE.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override
user_databack to summary
public long user_data()
Returns:long

the value of the IOURingCQE#user_data field.

Annotations
@NativeType:__u64
user_databack to summary
public IOURingCQE.Buffer user_data(long value)

Sets the specified value to the IOURingCQE#user_data field.