Function
GLibpointer_bit_lock_mask_ptr
since: 2.80
Declaration [src]
gpointer
g_pointer_bit_lock_mask_ptr (
gpointer ptr,
guint lock_bit,
gboolean set,
guintptr preserve_mask,
gpointer preserve_ptr
)
Description [src]
This mangles ptr
as g_pointer_bit_lock()
and g_pointer_bit_unlock()
do.
Available since: 2.80
Parameters
ptr
-
Type:
gpointer
The pointer to mask.
The argument can be NULL
.The data is owned by the caller of the function. lock_bit
-
Type:
guint
The bit to set/clear. If set to
G_MAXUINT
, the lockbit is taken frompreserve_ptr
orptr
(depending onpreserve_mask
). set
-
Type:
gboolean
Whether to set (lock) the bit or unset (unlock). This has no effect, if
lock_bit
is set toG_MAXUINT
. preserve_mask
-
Type:
guintptr
If non-zero, a bit-mask for
preserve_ptr
. Thepreserve_mask
bits frompreserve_ptr
are set in the result. Note that thelock_bit
bit will be always set according toset
, regardless ofpreserve_mask
andpreserve_ptr
(unlesslock_bit
isG_MAXUINT
). preserve_ptr
-
Type:
gpointer
If
preserve_mask
is non-zero, the bits from this pointer are set in the result.The argument can be NULL
.The data is owned by the caller of the function.