Package org.lwjgl.system.linux.liburing
Class IOURing
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.linux.liburing.IOURing
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class IOURing extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct io_uring {
struct io_uring_sq
sq;struct io_uring_cq
cq; unsigned int flags; int ring_fd; unsigned int features; unsigned int pad[3]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IOURing.Buffer
An array ofIOURing
structs.
-
Constructor Summary
Constructors Constructor Description IOURing(java.nio.ByteBuffer container)
Creates aIOURing
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IOURing
calloc()
Returns a newIOURing
instance allocated withmemCalloc
.static IOURing.Buffer
calloc(int capacity)
Returns a newIOURing.Buffer
instance allocated withmemCalloc
.static IOURing.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOURing.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static IOURing
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOURing
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.IOURingCQ
cq()
IOURing
cq(java.util.function.Consumer<IOURingCQ> consumer)
Passes thecq
field to the specifiedConsumer
.IOURing
cq(IOURingCQ value)
Copies the specifiedIOURingCQ
to thecq
field.static IOURing
create()
Returns a newIOURing
instance allocated withBufferUtils
.static IOURing.Buffer
create(int capacity)
Returns a newIOURing.Buffer
instance allocated withBufferUtils
.static IOURing
create(long address)
Returns a newIOURing
instance for the specified memory address.static IOURing.Buffer
create(long address, int capacity)
Create aIOURing.Buffer
instance at the specified memory.static IOURing
createSafe(long address)
static IOURing.Buffer
createSafe(long address, int capacity)
int
features()
IOURing
features(int value)
Sets the specified value to thefeatures
field.int
flags()
IOURing
flags(int value)
Sets the specified value to theflags
field.static IOURing
malloc()
Returns a newIOURing
instance allocated withmemAlloc
.static IOURing.Buffer
malloc(int capacity)
Returns a newIOURing.Buffer
instance allocated withmemAlloc
.static IOURing.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOURing.Buffer
instance allocated on the specifiedMemoryStack
.static IOURing
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOURing
instance allocated on the specifiedMemoryStack
.static IOURingCQ
ncq(long struct)
Unsafe version ofcq()
.static void
ncq(long struct, IOURingCQ value)
Unsafe version ofcq
.static int
nfeatures(long struct)
Unsafe version offeatures()
.static void
nfeatures(long struct, int value)
Unsafe version offeatures
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static java.nio.IntBuffer
npad(long struct)
static int
npad(long struct, int index)
static void
npad(long struct, int index, int value)
static void
npad(long struct, java.nio.IntBuffer value)
static int
nring_fd(long struct)
Unsafe version ofring_fd()
.static void
nring_fd(long struct, int value)
Unsafe version ofring_fd
.static IOURingSQ
nsq(long struct)
Unsafe version ofsq()
.static void
nsq(long struct, IOURingSQ value)
Unsafe version ofsq
.int
ring_fd()
IOURing
ring_fd(int value)
Sets the specified value to thering_fd
field.IOURing
set(IOURing src)
Copies the specified struct data to this struct.IOURing
set(IOURingSQ sq, IOURingCQ cq, int flags, int ring_fd, int features)
Initializes this struct with the specified values.int
sizeof()
IOURingSQ
sq()
IOURing
sq(java.util.function.Consumer<IOURingSQ> consumer)
Passes thesq
field to the specifiedConsumer
.IOURing
sq(IOURingSQ value)
Copies the specifiedIOURingSQ
to thesq
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.
-
-
-
Constructor Detail
-
IOURing
public IOURing(java.nio.ByteBuffer container)
Creates aIOURing
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
flags
public int flags()
- Returns:
- the value of the
flags
field.
-
ring_fd
public int ring_fd()
- Returns:
- the value of the
ring_fd
field.
-
features
public int features()
- Returns:
- the value of the
features
field.
-
sq
public IOURing sq(java.util.function.Consumer<IOURingSQ> consumer)
Passes thesq
field to the specifiedConsumer
.
-
cq
public IOURing cq(java.util.function.Consumer<IOURingCQ> consumer)
Passes thecq
field to the specifiedConsumer
.
-
flags
public IOURing flags(int value)
Sets the specified value to theflags
field.
-
ring_fd
public IOURing ring_fd(int value)
Sets the specified value to thering_fd
field.
-
features
public IOURing features(int value)
Sets the specified value to thefeatures
field.
-
set
public IOURing set(IOURingSQ sq, IOURingCQ cq, int flags, int ring_fd, int features)
Initializes this struct with the specified values.
-
set
public IOURing set(IOURing src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static IOURing malloc()
Returns a newIOURing
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static IOURing calloc()
Returns a newIOURing
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static IOURing create()
Returns a newIOURing
instance allocated withBufferUtils
.
-
create
public static IOURing create(long address)
Returns a newIOURing
instance for the specified memory address.
-
createSafe
@Nullable public static IOURing createSafe(long address)
-
malloc
public static IOURing.Buffer malloc(int capacity)
Returns a newIOURing.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static IOURing.Buffer calloc(int capacity)
Returns a newIOURing.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static IOURing.Buffer create(int capacity)
Returns a newIOURing.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static IOURing.Buffer create(long address, int capacity)
Create aIOURing.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static IOURing.Buffer createSafe(long address, int capacity)
-
malloc
public static IOURing malloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOURing
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static IOURing calloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOURing
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static IOURing.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOURing.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static IOURing.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newIOURing.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nflags
public static int nflags(long struct)
Unsafe version offlags()
.
-
nring_fd
public static int nring_fd(long struct)
Unsafe version ofring_fd()
.
-
nfeatures
public static int nfeatures(long struct)
Unsafe version offeatures()
.
-
npad
public static java.nio.IntBuffer npad(long struct)
-
npad
public static int npad(long struct, int index)
-
nflags
public static void nflags(long struct, int value)
Unsafe version offlags
.
-
nring_fd
public static void nring_fd(long struct, int value)
Unsafe version ofring_fd
.
-
nfeatures
public static void nfeatures(long struct, int value)
Unsafe version offeatures
.
-
npad
public static void npad(long struct, java.nio.IntBuffer value)
-
npad
public static void npad(long struct, int index, int value)
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
-