Package org.lwjgl.system.linux
Class EpollData
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
union epoll_data_t {
void * ptr;
int fd;
uint32_t u32;
uint64_t u64;
}-
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 alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionEpollData(ByteBuffer container) Creates aEpollDatainstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic EpollDatacalloc()Returns a newEpollDatainstance allocated withmemCalloc.static EpollData.Buffercalloc(int capacity) Returns a newEpollData.Bufferinstance allocated withmemCalloc.static EpollData.Buffercalloc(int capacity, MemoryStack stack) Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static EpollDatacalloc(MemoryStack stack) Returns a newEpollDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static EpollDatacreate()Returns a newEpollDatainstance allocated withBufferUtils.static EpollData.Buffercreate(int capacity) Returns a newEpollData.Bufferinstance allocated withBufferUtils.static EpollDatacreate(long address) Returns a newEpollDatainstance for the specified memory address.static EpollData.Buffercreate(long address, int capacity) Create aEpollData.Bufferinstance at the specified memory.static @Nullable EpollDatacreateSafe(long address) static @Nullable EpollData.BuffercreateSafe(long address, int capacity) intfd()fd(int value) Sets the specified value to thefdfield.static EpollDatamalloc()Returns a newEpollDatainstance allocated withmemAlloc.static EpollData.Buffermalloc(int capacity) Returns a newEpollData.Bufferinstance allocated withmemAlloc.static EpollData.Buffermalloc(int capacity, MemoryStack stack) Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStack.static EpollDatamalloc(MemoryStack stack) Returns a newEpollDatainstance allocated on the specifiedMemoryStack.static intnfd(long struct) Unsafe version offd().static voidnfd(long struct, int value) Unsafe version offd.static longnptr(long struct) Unsafe version ofptr().static voidnptr(long struct, long value) Unsafe version ofptr.static intnu32(long struct) Unsafe version ofu32().static voidnu32(long struct, int value) Unsafe version ofu32.static longnu64(long struct) Unsafe version ofu64().static voidnu64(long struct, long value) Unsafe version ofu64.longptr()ptr(long value) Sets the specified value to theptrfield.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).intu32()u32(int value) Sets the specified value to theu32field.longu64()u64(long value) Sets the specified value to theu64field.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. -
PTR
public static final int PTRThe struct member offsets. -
FD
public static final int FDThe struct member offsets. -
U32
public static final int U32The struct member offsets. -
U64
public static final int U64The struct member offsets.
-
-
Constructor Details
-
EpollData
Creates aEpollDatainstance 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). -
ptr
public long ptr()- Returns:
- the value of the
ptrfield.
-
fd
public int fd()- Returns:
- the value of the
fdfield.
-
u32
public int u32()- Returns:
- the value of the
u32field.
-
u64
public long u64()- Returns:
- the value of the
u64field.
-
ptr
Sets the specified value to theptrfield. -
fd
Sets the specified value to thefdfield. -
u32
Sets the specified value to theu32field. -
u64
Sets the specified value to theu64field. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newEpollDatainstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newEpollDatainstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newEpollDatainstance allocated withBufferUtils. -
create
Returns a newEpollDatainstance for the specified memory address. -
createSafe
-
malloc
Returns a newEpollData.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newEpollData.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newEpollData.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aEpollData.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newEpollDatainstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newEpollDatainstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newEpollData.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nptr
public static long nptr(long struct) Unsafe version ofptr(). -
nfd
public static int nfd(long struct) Unsafe version offd(). -
nu32
public static int nu32(long struct) Unsafe version ofu32(). -
nu64
public static long nu64(long struct) Unsafe version ofu64(). -
nptr
public static void nptr(long struct, long value) Unsafe version ofptr. -
nfd
public static void nfd(long struct, int value) Unsafe version offd. -
nu32
public static void nu32(long struct, int value) Unsafe version ofu32. -
nu64
public static void nu64(long struct, long value) Unsafe version ofu64.
-