Function

GLib-2.0GLibpointer_bit_unlock_and_setSince 2.80

  • 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.

    Parameters

    • address: any

      a pointer to a gpointer-sized value

    • lock_bit: number

      a bit value between 0 and 31

    • ptr: any

      the new pointer value to set

    • preserve_mask: never

      if non-zero, those bits of the current pointer in address are preserved. Note that the lock_bit bit will be always unset regardless of ptr, preserve_mask and the currently set value in address.

    Returns void

    2.80