pointerBitLockAndGet

fnvoid pointerBitLockAndGet(void * address, uint lockBit, out size_t outPtr)

This is equivalent to g_bit_lock, but working on pointers (or other pointer-sized values).

For portability reasons, you may only lock on the bottom 32 bits of the pointer.

Parameters

addressa pointer to a #gpointer-sized value
lockBita bit value between 0 and 31
outPtrreturns the set pointer atomically. This is the value after setting the lock, it thus always has the lock bit set, while previously address had the lockbit unset. You may also use [glib.global.pointerBitLockMaskPtr] to clear the lock bit.