GLib.bit_lock_and_get
Description: Reference for GLib.bit_lock_and_get

### Function

# GLibbit_lock_and_get

since: 2.86

#### Declaration [src]

    void
    g_bit_lock_and_get (
      gint* address,
      guint lock_bit,
      gint* out_val
    )

#### Description [src]

Sets the indicated `lock_bit` in `address` and atomically returns the new value.

This is like `g_bit_lock()`, except it can atomically return the new value at `address` (right after obtaining the lock). Thus the value returned in `out_val` always has the `lock_bit` set.

Available since: 2.86

#### Parameters

`address`

  Type: `gint*`

  A pointer to an integer.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`lock_bit`

  Type: `guint`

  A bit value between 0 and 31.

`out_val`

  Type: `gint*`

  Return location for the new value of the integer.

  The argument will be set by the function.
  The argument can be `NULL`.