1QB_ATOMIC_INT_EXCHANGE_AND_AlDiDb(q3b)Programmer'sQMBa_nAuTaOlMIC_INT_EXCHANGE_AND_ADD(3)
2
3
4

NAME

6       qb_atomic_int_exchange_and_add  -  Atomically  adds  val to the integer
7       pointed to by atomic.
8

SYNOPSIS

10       #include <qb/qbatomic.h>
11
12       int32_t qb_atomic_int_exchange_and_add(
13           volatile int32_t QB_GNUC_MAY_ALIAS   *atomic,
14           int32_t                               val
15       );
16

PARAMS

18       atomic a pointer to an integer
19
20       val    the value to add to *atomic
21

DESCRIPTION

23       It returns the value of *atomic just before the  addition  took  place.
24       Also acts as a memory barrier.
25

RETURN VALUE

27       the value of *atomic before the addition.
28

SEE ALSO

30       qb_atomic_int_set(3), qb_atomic_int_compare_and_exchange(3),
31       qb_atomic_int_get(3), qb_atomic_int_add(3), qb_atomic_init(3),
32       qb_atomic_pointer_get(3), qb_atomic_pointer_compare_and_exchange(3),
33       qb_atomic_pointer_set(3)
34
36       Copyright (C) 2010-2020 Red Hat, Inc. All rights reserved.
37
38
39
40LIBQB                             2020-07-30 QB_ATOMIC_INT_EXCHANGE_AND_ADD(3)
Impressum