Package org.lwjgl.system.linux
Class Flock
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct flock64 {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
}-
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 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
ConstructorsConstructorDescriptionFlock(ByteBuffer container) Creates aFlockinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic Flockcalloc()Returns a newFlockinstance allocated withmemCalloc.static Flock.Buffercalloc(int capacity) Returns a newFlock.Bufferinstance allocated withmemCalloc.static Flock.Buffercalloc(int capacity, MemoryStack stack) Returns a newFlock.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static Flockcalloc(MemoryStack stack) Returns a newFlockinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static Flockcreate()Returns a newFlockinstance allocated withBufferUtils.static Flock.Buffercreate(int capacity) Returns a newFlock.Bufferinstance allocated withBufferUtils.static Flockcreate(long address) Returns a newFlockinstance for the specified memory address.static Flock.Buffercreate(long address, int capacity) Create aFlock.Bufferinstance at the specified memory.static @Nullable FlockcreateSafe(long address) static @Nullable Flock.BuffercreateSafe(long address, int capacity) longl_len()l_len(long value) Sets the specified value to thel_lenfield.intl_pid()l_pid(int value) Sets the specified value to thel_pidfield.longl_start()l_start(long value) Sets the specified value to thel_startfield.shortl_type()l_type(short value) Sets the specified value to thel_typefield.shortl_whence()l_whence(short value) Sets the specified value to thel_whencefield.static Flockmalloc()Returns a newFlockinstance allocated withmemAlloc.static Flock.Buffermalloc(int capacity) Returns a newFlock.Bufferinstance allocated withmemAlloc.static Flock.Buffermalloc(int capacity, MemoryStack stack) Returns a newFlock.Bufferinstance allocated on the specifiedMemoryStack.static Flockmalloc(MemoryStack stack) Returns a newFlockinstance allocated on the specifiedMemoryStack.static longnl_len(long struct) Unsafe version ofl_len().static voidnl_len(long struct, long value) Unsafe version ofl_len.static intnl_pid(long struct) Unsafe version ofl_pid().static voidnl_pid(long struct, int value) Unsafe version ofl_pid.static longnl_start(long struct) Unsafe version ofl_start().static voidnl_start(long struct, long value) Unsafe version ofl_start.static shortnl_type(long struct) Unsafe version ofl_type().static voidnl_type(long struct, short value) Unsafe version ofl_type.static shortnl_whence(long struct) Unsafe version ofl_whence().static voidnl_whence(long struct, short value) Unsafe version ofl_whence.set(short l_type, short l_whence, long l_start, long l_len, int l_pid) Initializes this struct with the specified values.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. -
L_TYPE
public static final int L_TYPEThe struct member offsets. -
L_WHENCE
public static final int L_WHENCEThe struct member offsets. -
L_START
public static final int L_STARTThe struct member offsets. -
L_LEN
public static final int L_LENThe struct member offsets. -
L_PID
public static final int L_PIDThe struct member offsets.
-
-
Constructor Details
-
Flock
Creates aFlockinstance 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). -
l_type
public short l_type()- Returns:
- the value of the
l_typefield.
-
l_whence
public short l_whence()- Returns:
- the value of the
l_whencefield.
-
l_start
public long l_start()- Returns:
- the value of the
l_startfield.
-
l_len
public long l_len()- Returns:
- the value of the
l_lenfield.
-
l_pid
public int l_pid()- Returns:
- the value of the
l_pidfield.
-
l_type
Sets the specified value to thel_typefield. -
l_whence
Sets the specified value to thel_whencefield. -
l_start
Sets the specified value to thel_startfield. -
l_len
Sets the specified value to thel_lenfield. -
l_pid
Sets the specified value to thel_pidfield. -
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 newFlockinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newFlockinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newFlockinstance allocated withBufferUtils. -
create
Returns a newFlockinstance for the specified memory address. -
createSafe
-
malloc
Returns a newFlock.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newFlock.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newFlock.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aFlock.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newFlockinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newFlockinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newFlock.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newFlock.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nl_type
public static short nl_type(long struct) Unsafe version ofl_type(). -
nl_whence
public static short nl_whence(long struct) Unsafe version ofl_whence(). -
nl_start
public static long nl_start(long struct) Unsafe version ofl_start(). -
nl_len
public static long nl_len(long struct) Unsafe version ofl_len(). -
nl_pid
public static int nl_pid(long struct) Unsafe version ofl_pid(). -
nl_type
public static void nl_type(long struct, short value) Unsafe version ofl_type. -
nl_whence
public static void nl_whence(long struct, short value) Unsafe version ofl_whence. -
nl_start
public static void nl_start(long struct, long value) Unsafe version ofl_start. -
nl_len
public static void nl_len(long struct, long value) Unsafe version ofl_len. -
nl_pid
public static void nl_pid(long struct, int value) Unsafe version ofl_pid.
-