1QB_ATOMIC_INT_EXCHANGE_AND_AlDiDb(q3b)Programmer'sQMBa_nAuTaOlMIC_INT_EXCHANGE_AND_ADD(3)
2
3
4
6 qb_atomic_int_exchange_and_add - Atomically adds val to the integer
7 pointed to by atomic.
8
9
11 #include <qb/qbatomic.h>
12
13 int32_t qb_atomic_int_exchange_and_add(
14 volatile int32_t QB_GNUC_MAY_ALIAS *atomic,
15 int32_t val
16 );
17
19 atomic a pointer to an integer
20
21 val the value to add to *atomic
22
24 It returns the value of *atomic just before the addition took place.
25 Also acts as a memory barrier.
26
28 the value of *atomic before the addition.
29
31 qb_atomic_int_set(3), qb_atomic_int_compare_and_exchange(3),
32 qb_atomic_int_get(3), qb_atomic_int_add(3), qb_atomic_init(3),
33 qb_atomic_pointer_get(3), qb_atomic_pointer_compare_and_exchange(3),
34 qb_atomic_pointer_set(3)
35
37 Copyright (C) 2003 Sebastian Wilhelmi
38
39
40
41LIBQB 2021-03-03 QB_ATOMIC_INT_EXCHANGE_AND_ADD(3)