Function

GLibatomic_int_exchange_and_add

Declaration [src]

gint
g_atomic_int_exchange_and_add (
  volatile gint* atomic,
  gint val
)

Description [src]

This function existed before g_atomic_int_add() returned the prior value of the integer (which it now does). It is retained only for compatibility reasons. Don’t use this function in new code.

Available since:2.4
Deprecated since:2.30

Use g_atomic_int_add() instead.

Parameters

atomic volatile gint*
 

A pointer to a #gint.

 The data is owned by the caller of the function.
val gint
 

The value to add.

Return value

Returns: gint
 

The value of atomic before the add, signed.