Package org.lwjgl.system.linux.liburing
Class IOURingBuf
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct
org.lwjgl.system.linux.liburing.IOURingBuf
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class IOURingBuf
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Layout
struct io_uring_buf {
__u64 addr;
__u32 len;
__u16 bid;
__u16 resv;
}
-
Nested Class Summary
Nested 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
Modifier and TypeFieldDescriptionstatic final int
The struct member offsets.static 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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionIOURingBuf
(ByteBuffer container) Creates aIOURingBuf
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionlong
addr()
addr
(long value) Sets the specified value to theaddr
field.short
bid()
bid
(short value) Sets the specified value to thebid
field.static IOURingBuf
calloc()
Returns a newIOURingBuf
instance allocated withmemCalloc
.static IOURingBuf.Buffer
calloc
(int capacity) Returns a newIOURingBuf.Buffer
instance allocated withmemCalloc
.static IOURingBuf.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newIOURingBuf.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IOURingBuf
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newIOURingBuf
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IOURingBuf
create()
Returns a newIOURingBuf
instance allocated withBufferUtils
.static IOURingBuf.Buffer
create
(int capacity) Returns a newIOURingBuf.Buffer
instance allocated withBufferUtils
.static IOURingBuf
create
(long address) Returns a newIOURingBuf
instance for the specified memory address.static IOURingBuf.Buffer
create
(long address, int capacity) Create aIOURingBuf.Buffer
instance at the specified memory.static IOURingBuf
createSafe
(long address) static IOURingBuf.Buffer
createSafe
(long address, int capacity) int
len()
len
(int value) Sets the specified value to thelen
field.static IOURingBuf
malloc()
Returns a newIOURingBuf
instance allocated withmemAlloc
.static IOURingBuf.Buffer
malloc
(int capacity) Returns a newIOURingBuf.Buffer
instance allocated withmemAlloc
.static IOURingBuf.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newIOURingBuf.Buffer
instance allocated on the specifiedMemoryStack
.static IOURingBuf
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newIOURingBuf
instance allocated on the specifiedMemoryStack
.static long
naddr
(long struct) Unsafe version ofaddr()
.static void
naddr
(long struct, long value) Unsafe version ofaddr
.static short
nbid
(long struct) Unsafe version ofbid()
.static void
nbid
(long struct, short value) Unsafe version ofbid
.static int
nlen
(long struct) Unsafe version oflen()
.static void
nlen
(long struct, int value) Unsafe version oflen
.static short
nresv
(long struct) Unsafe version ofresv()
.static void
nresv
(long struct, short value) Unsafe version ofresv
.short
resv()
resv
(short value) Sets the specified value to theresv
field.set
(long addr, int len, short bid, short resv) Initializes this struct with the specified values.set
(IOURingBuf src) Copies the specified struct data to this struct.int
sizeof()
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. -
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 aIOURingBuf
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
-
addr
public long addr()- Returns:
- the value of the
addr
field.
-
len
public int len()- Returns:
- the value of the
len
field.
-
bid
public short bid()- Returns:
- the value of the
bid
field.
-
resv
public short resv()- Returns:
- the value of the
resv
field.
-
addr
Sets the specified value to theaddr
field. -
len
Sets the specified value to thelen
field. -
bid
Sets the specified value to thebid
field. -
resv
Sets the specified value to theresv
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 newIOURingBuf
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newIOURingBuf
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newIOURingBuf
instance allocated withBufferUtils
. -
create
Returns a newIOURingBuf
instance for the specified memory address. -
createSafe
-
malloc
Returns a newIOURingBuf.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newIOURingBuf.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newIOURingBuf.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aIOURingBuf.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newIOURingBuf
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newIOURingBuf
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newIOURingBuf.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newIOURingBuf.Buffer
instance allocated on the specifiedMemoryStack
and 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) Unsafe version ofresv()
. -
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) Unsafe version ofresv
.
-