Package org.lwjgl.system.linux.liburing
Class IOURingBuf
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct io_uring_buf {
__u64 addr;
__u32 len;
__u16 bid;
__u16 resv;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionIOURingBuf(ByteBuffer container) Creates aIOURingBufinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongaddr()addr(long value) Sets the specified value to theaddrfield.shortbid()bid(short value) Sets the specified value to thebidfield.static IOURingBufcalloc()Returns a newIOURingBufinstance allocated withmemCalloc.static IOURingBuf.Buffercalloc(int capacity) Returns a newIOURingBuf.Bufferinstance allocated withmemCalloc.static IOURingBuf.Buffercalloc(int capacity, MemoryStack stack) Returns a newIOURingBuf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static IOURingBufcalloc(MemoryStack stack) Returns a newIOURingBufinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static IOURingBufcreate()Returns a newIOURingBufinstance allocated withBufferUtils.static IOURingBuf.Buffercreate(int capacity) Returns a newIOURingBuf.Bufferinstance allocated withBufferUtils.static IOURingBufcreate(long address) Returns a newIOURingBufinstance for the specified memory address.static IOURingBuf.Buffercreate(long address, int capacity) Create aIOURingBuf.Bufferinstance at the specified memory.static @Nullable IOURingBufcreateSafe(long address) static @Nullable IOURingBuf.BuffercreateSafe(long address, int capacity) intlen()len(int value) Sets the specified value to thelenfield.static IOURingBufmalloc()Returns a newIOURingBufinstance allocated withmemAlloc.static IOURingBuf.Buffermalloc(int capacity) Returns a newIOURingBuf.Bufferinstance allocated withmemAlloc.static IOURingBuf.Buffermalloc(int capacity, MemoryStack stack) Returns a newIOURingBuf.Bufferinstance allocated on the specifiedMemoryStack.static IOURingBufmalloc(MemoryStack stack) Returns a newIOURingBufinstance allocated on the specifiedMemoryStack.static longnaddr(long struct) Unsafe version ofaddr().static voidnaddr(long struct, long value) Unsafe version ofaddr.static shortnbid(long struct) Unsafe version ofbid().static voidnbid(long struct, short value) Unsafe version ofbid.static intnlen(long struct) Unsafe version oflen().static voidnlen(long struct, int value) Unsafe version oflen.static shortnresv(long struct) static voidnresv(long struct, short value) set(long addr, int len, short bid) Initializes this struct with the specified values.set(IOURingBuf src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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. -
ADDR
public static final int ADDRThe struct member offsets. -
LEN
public static final int LENThe struct member offsets. -
BID
public static final int BIDThe struct member offsets. -
RESV
public static final int RESVThe struct member offsets.
-
-
Constructor Details
-
IOURingBuf
Creates aIOURingBufinstance at the current position of the specifiedByteBuffercontainer. 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()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<IOURingBuf>
-
addr
public long addr()- Returns:
- the value of the
addrfield.
-
len
public int len()- Returns:
- the value of the
lenfield.
-
bid
public short bid()- Returns:
- the value of the
bidfield.
-
addr
Sets the specified value to theaddrfield. -
len
Sets the specified value to thelenfield. -
bid
Sets the specified value to thebidfield. -
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 newIOURingBufinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newIOURingBufinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newIOURingBufinstance allocated withBufferUtils. -
create
Returns a newIOURingBufinstance for the specified memory address. -
createSafe
-
malloc
Returns a newIOURingBuf.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newIOURingBuf.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newIOURingBuf.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aIOURingBuf.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newIOURingBufinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newIOURingBufinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newIOURingBuf.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newIOURingBuf.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
naddr
public static long naddr(long struct) Unsafe version ofaddr(). -
nlen
public static int nlen(long struct) Unsafe version oflen(). -
nbid
public static short nbid(long struct) Unsafe version ofbid(). -
nresv
public static short nresv(long struct) -
naddr
public static void naddr(long struct, long value) Unsafe version ofaddr. -
nlen
public static void nlen(long struct, int value) Unsafe version oflen. -
nbid
public static void nbid(long struct, short value) Unsafe version ofbid. -
nresv
public static void nresv(long struct, short value)
-