Function
GLibpointer_bit_unlock_and_set
since: 2.80
Declaration
void
g_pointer_bit_unlock_and_set (
void* address,
guint lock_bit,
gpointer ptr,
guintptr preserve_mask
)
Description
This is equivalent to g_pointer_bit_unlock() and atomically setting
the pointer value.
Note that the lock bit will be cleared from the pointer. If the unlocked
pointer that was set is not identical to ptr, an assertion fails. In other
words, ptr must have lock_bit unset. This also means, you usually can
only use this on the lowest bits.
Available since: 2.80
Parameters
address-
Type:
void*A pointer to a #gpointer-sized value.
The data is owned by the caller of the function. lock_bit-
Type:
guintA bit value between 0 and 31.
ptr-
Type:
gpointerThe new pointer value to set.
The argument can be NULL.The data is owned by the caller of the function. preserve_mask-
Type:
guintptrIf non-zero, those bits of the current pointer in
addressare preserved. Note that thelock_bitbit will be always set according toset, regardless ofpreserve_maskand the currently set value inaddress.