Top Description Inners Fields Constructors Methods
org.lwjgl.system.linux

public Class Flock

extends Struct<Flock>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct flock64
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Layout


struct flock64 {
    short l_type;
    short l_whence;
    off_t l_start;
    off_t l_len;
    pid_t l_pid;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Flock.Buffer

An array of Flock structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
L_LEN

The struct member offsets.

public static final int
L_PID

The struct member offsets.

public static final int
L_START

The struct member offsets.

public static final int
L_TYPE

The struct member offsets.

public static final int
L_WHENCE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
Flock(long address, ByteBuffer container)

public
Flock(ByteBuffer container)

Creates a Flock instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static Flock
calloc()

Returns a new Flock instance allocated with memCalloc.

public static Flock.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new Flock.Buffer instance allocated with memCalloc.

public static Flock
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new Flock instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static Flock.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new Flock.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected Flock
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static Flock
create()

Returns a new Flock instance allocated with BufferUtils.

public static Flock
create(long address)

Returns a new Flock instance for the specified memory address.

public static Flock.Buffer
create(int
the buffer capacity
capacity
)

Returns a new Flock.Buffer instance allocated with BufferUtils.

public static Flock.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a Flock.Buffer instance at the specified memory.

public static Flock
createSafe(long address)

Like create, but returns null if address is NULL.

public static Flock.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public long
l_len()

size of the locked area; zero means until EOF

public Flock
l_len(long value)

Sets the specified value to the l_len field.

public int
l_pid()

process holding the lock

public Flock
l_pid(int value)

Sets the specified value to the l_pid field.

public long
l_start()

offset where the lock begins

public Flock
l_start(long value)

Sets the specified value to the l_start field.

public short
l_type()

type of lock.

public Flock
l_type(short value)

Sets the specified value to the l_type field.

public short
l_whence()

where l_start is relative to (like lseek)

public Flock
l_whence(short value)

Sets the specified value to the l_whence field.

public static Flock
malloc()

Returns a new Flock instance allocated with memAlloc.

public static Flock.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new Flock.Buffer instance allocated with memAlloc.

public static Flock
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new Flock instance allocated on the specified MemoryStack.

public static Flock.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new Flock.Buffer instance allocated on the specified MemoryStack.

public static long
nl_len(long struct)

Unsafe version of l_len.

public static void
nl_len(long struct, long value)

Unsafe version of l_len.

public static int
nl_pid(long struct)

Unsafe version of l_pid.

public static void
nl_pid(long struct, int value)

Unsafe version of l_pid.

public static long
nl_start(long struct)

Unsafe version of l_start.

public static void
nl_start(long struct, long value)

Unsafe version of l_start.

public static short
nl_type(long struct)

Unsafe version of l_type.

public static void
nl_type(long struct, short value)

Unsafe version of l_type.

public static short
nl_whence(long struct)

Unsafe version of l_whence.

public static void
nl_whence(long struct, short value)

Unsafe version of l_whence.

public Flock
set(short l_type, short l_whence, long l_start, long l_len, int l_pid)

Initializes this struct with the specified values.

public Flock

Returns:

this struct
set
(Flock
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

L_LENback to summary
public static final int L_LEN

The struct member offsets.

L_PIDback to summary
public static final int L_PID

The struct member offsets.

L_STARTback to summary
public static final int L_START

The struct member offsets.

L_TYPEback to summary
public static final int L_TYPE

The struct member offsets.

L_WHENCEback to summary
public static final int L_WHENCE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

Flockback to summary
protected Flock(long address, ByteBuffer container)
Flockback to summary
public Flock(ByteBuffer container)

Creates a Flock instance at the current position of the specified ByteBuffer 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

callocback to summary
public static Flock calloc()

Returns a new Flock instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static Flock.Buffer calloc(int capacity)

Returns a new Flock.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static Flock calloc(MemoryStack stack)

Returns a new Flock instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static Flock.Buffer calloc(int capacity, MemoryStack stack)

Returns a new Flock.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected Flock create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static Flock create()

Returns a new Flock instance allocated with BufferUtils.

createback to summary
public static Flock create(long address)

Returns a new Flock instance for the specified memory address.

createback to summary
public static Flock.Buffer create(int capacity)

Returns a new Flock.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static Flock.Buffer create(long address, int capacity)

Create a Flock.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static Flock createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static Flock.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
l_lenback to summary
public long l_len()

size of the locked area; zero means until EOF

Annotations
@NativeType:off_t
l_lenback to summary
public Flock l_len(long value)

Sets the specified value to the l_len field.

l_pidback to summary
public int l_pid()

process holding the lock

Annotations
@NativeType:pid_t
l_pidback to summary
public Flock l_pid(int value)

Sets the specified value to the l_pid field.

l_startback to summary
public long l_start()

offset where the lock begins

Annotations
@NativeType:off_t
l_startback to summary
public Flock l_start(long value)

Sets the specified value to the l_start field.

l_typeback to summary
public short l_type()

type of lock. One of:

FCNTL#F_RDLCKFCNTL#F_WRLCKFCNTL#F_UNLCK
l_typeback to summary
public Flock l_type(short value)

Sets the specified value to the l_type field.

l_whenceback to summary
public short l_whence()

where l_start is relative to (like lseek)

l_whenceback to summary
public Flock l_whence(short value)

Sets the specified value to the l_whence field.

mallocback to summary
public static Flock malloc()

Returns a new Flock instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static Flock.Buffer malloc(int capacity)

Returns a new Flock.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static Flock malloc(MemoryStack stack)

Returns a new Flock instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static Flock.Buffer malloc(int capacity, MemoryStack stack)

Returns a new Flock.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

nl_lenback to summary
public static long nl_len(long struct)

Unsafe version of l_len.

nl_lenback to summary
public static void nl_len(long struct, long value)

Unsafe version of l_len.

nl_pidback to summary
public static int nl_pid(long struct)

Unsafe version of l_pid.

nl_pidback to summary
public static void nl_pid(long struct, int value)

Unsafe version of l_pid.

nl_startback to summary
public static long nl_start(long struct)

Unsafe version of l_start.

nl_startback to summary
public static void nl_start(long struct, long value)

Unsafe version of l_start.

nl_typeback to summary
public static short nl_type(long struct)

Unsafe version of l_type.

nl_typeback to summary
public static void nl_type(long struct, short value)

Unsafe version of l_type.

nl_whenceback to summary
public static short nl_whence(long struct)

Unsafe version of l_whence.

nl_whenceback to summary
public static void nl_whence(long struct, short value)

Unsafe version of l_whence.

setback to summary
public Flock set(short l_type, short l_whence, long l_start, long l_len, int l_pid)

Initializes this struct with the specified values.

setback to summary
public Flock set(Flock src)

Copies the specified struct data to this struct.

Parameters
src:Flock

the source struct

Returns:Flock

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.system.linux back to summary

public Class Flock.Buffer

extends StructBuffer<Flock, Flock.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of Flock structs.

Field Summary

Modifier and TypeField and Description
private static final Flock

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new Flock.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected Flock
public long

Returns:

the value of the Flock#l_len field.
l_len
()

public Flock.Buffer
l_len(long value)

Sets the specified value to the Flock#l_len field.

public int

Returns:

the value of the Flock#l_pid field.
l_pid
()

public Flock.Buffer
l_pid(int value)

Sets the specified value to the Flock#l_pid field.

public long

Returns:

the value of the Flock#l_start field.
l_start
()

public Flock.Buffer
l_start(long value)

Sets the specified value to the Flock#l_start field.

public short

Returns:

the value of the Flock#l_type field.
l_type
()

public Flock.Buffer
l_type(short value)

Sets the specified value to the Flock#l_type field.

public short

Returns:

the value of the Flock#l_whence field.
l_whence
()

public Flock.Buffer
l_whence(short value)

Sets the specified value to the Flock#l_whence field.

protected Flock.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final Flock ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new Flock.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by Flock#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected Flock getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
l_lenback to summary
public long l_len()
Returns:long

the value of the Flock#l_len field.

Annotations
@NativeType:off_t
l_lenback to summary
public Flock.Buffer l_len(long value)

Sets the specified value to the Flock#l_len field.

l_pidback to summary
public int l_pid()
Returns:int

the value of the Flock#l_pid field.

Annotations
@NativeType:pid_t
l_pidback to summary
public Flock.Buffer l_pid(int value)

Sets the specified value to the Flock#l_pid field.

l_startback to summary
public long l_start()
Returns:long

the value of the Flock#l_start field.

Annotations
@NativeType:off_t
l_startback to summary
public Flock.Buffer l_start(long value)

Sets the specified value to the Flock#l_start field.

l_typeback to summary
public short l_type()
Returns:short

the value of the Flock#l_type field.

l_typeback to summary
public Flock.Buffer l_type(short value)

Sets the specified value to the Flock#l_type field.

l_whenceback to summary
public short l_whence()
Returns:short

the value of the Flock#l_whence field.

l_whenceback to summary
public Flock.Buffer l_whence(short value)

Sets the specified value to the Flock#l_whence field.

selfback to summary
protected Flock.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override