GLib.pointer_bit_trylock (original) (raw)
Function
GLibpointer_bit_trylock
since: 2.30
Declaration [src]
gboolean
g_pointer_bit_trylock (
void* address,
gint lock_bit
)
Description [src]
This is equivalent to g_bit_trylock(), but working on pointers (or other pointer-sized values).
For portability reasons, you may only lock on the bottom 32 bits of the pointer.
While address
has a volatile
qualifier, this is a historical artifact and the argument passed to it should not be volatile
.
Available since: 2.30
Parameters
address
Type: void*
A pointer to a #gpointer-sized value.
The data is owned by the caller of the function.
lock_bit
Type: gint
A bit value between 0 and 31.
Return value
Type: gboolean
TRUE
if the lock was acquired.