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.NativeResourceLayout
struct io_uring {struct io_uring_sqsq;struct io_uring_cqcq; unsigned int flags; int ring_fd; unsigned int features; unsigned int pad[3]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIOURing.BufferAn array ofIOURingstructs.
-
Constructor Summary
Constructors Constructor Description IOURing(java.nio.ByteBuffer container)Creates aIOURinginstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IOURingcalloc()Returns a newIOURinginstance allocated withmemCalloc.static IOURing.Buffercalloc(int capacity)Returns a newIOURing.Bufferinstance allocated withmemCalloc.static IOURing.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newIOURing.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static IOURingcalloc(org.lwjgl.system.MemoryStack stack)Returns a newIOURinginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.IOURingCQcq()IOURingcq(java.util.function.Consumer<IOURingCQ> consumer)Passes thecqfield to the specifiedConsumer.IOURingcq(IOURingCQ value)Copies the specifiedIOURingCQto thecqfield.static IOURingcreate()Returns a newIOURinginstance allocated withBufferUtils.static IOURing.Buffercreate(int capacity)Returns a newIOURing.Bufferinstance allocated withBufferUtils.static IOURingcreate(long address)Returns a newIOURinginstance for the specified memory address.static IOURing.Buffercreate(long address, int capacity)Create aIOURing.Bufferinstance at the specified memory.static IOURingcreateSafe(long address)static IOURing.BuffercreateSafe(long address, int capacity)intfeatures()IOURingfeatures(int value)Sets the specified value to thefeaturesfield.intflags()IOURingflags(int value)Sets the specified value to theflagsfield.static IOURingmalloc()Returns a newIOURinginstance allocated withmemAlloc.static IOURing.Buffermalloc(int capacity)Returns a newIOURing.Bufferinstance allocated withmemAlloc.static IOURing.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newIOURing.Bufferinstance allocated on the specifiedMemoryStack.static IOURingmalloc(org.lwjgl.system.MemoryStack stack)Returns a newIOURinginstance allocated on the specifiedMemoryStack.static IOURingCQncq(long struct)Unsafe version ofcq().static voidncq(long struct, IOURingCQ value)Unsafe version ofcq.static intnfeatures(long struct)Unsafe version offeatures().static voidnfeatures(long struct, int value)Unsafe version offeatures.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static java.nio.IntBuffernpad(long struct)static intnpad(long struct, int index)static voidnpad(long struct, int index, int value)static voidnpad(long struct, java.nio.IntBuffer value)static intnring_fd(long struct)Unsafe version ofring_fd().static voidnring_fd(long struct, int value)Unsafe version ofring_fd.static IOURingSQnsq(long struct)Unsafe version ofsq().static voidnsq(long struct, IOURingSQ value)Unsafe version ofsq.intring_fd()IOURingring_fd(int value)Sets the specified value to thering_fdfield.IOURingset(IOURing src)Copies the specified struct data to this struct.IOURingset(IOURingSQ sq, IOURingCQ cq, int flags, int ring_fd, int features)Initializes this struct with the specified values.intsizeof()IOURingSQsq()IOURingsq(java.util.function.Consumer<IOURingSQ> consumer)Passes thesqfield to the specifiedConsumer.IOURingsq(IOURingSQ value)Copies the specifiedIOURingSQto thesqfield.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
IOURing
public IOURing(java.nio.ByteBuffer container)
Creates aIOURinginstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
flags
public int flags()
- Returns:
- the value of the
flagsfield.
-
ring_fd
public int ring_fd()
- Returns:
- the value of the
ring_fdfield.
-
features
public int features()
- Returns:
- the value of the
featuresfield.
-
sq
public IOURing sq(java.util.function.Consumer<IOURingSQ> consumer)
Passes thesqfield to the specifiedConsumer.
-
cq
public IOURing cq(java.util.function.Consumer<IOURingCQ> consumer)
Passes thecqfield to the specifiedConsumer.
-
flags
public IOURing flags(int value)
Sets the specified value to theflagsfield.
-
ring_fd
public IOURing ring_fd(int value)
Sets the specified value to thering_fdfield.
-
features
public IOURing features(int value)
Sets the specified value to thefeaturesfield.
-
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 newIOURinginstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static IOURing calloc()
Returns a newIOURinginstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static IOURing create()
Returns a newIOURinginstance allocated withBufferUtils.
-
create
public static IOURing create(long address)
Returns a newIOURinginstance for the specified memory address.
-
createSafe
@Nullable public static IOURing createSafe(long address)
-
malloc
public static IOURing.Buffer malloc(int capacity)
Returns a newIOURing.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static IOURing.Buffer calloc(int capacity)
Returns a newIOURing.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static IOURing.Buffer create(int capacity)
Returns a newIOURing.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static IOURing.Buffer create(long address, int capacity)
Create aIOURing.Bufferinstance 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 newIOURinginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static IOURing calloc(org.lwjgl.system.MemoryStack stack)
Returns a newIOURinginstance allocated on the specifiedMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-