1QB_ATOMIC_POINTER_COMPARE_ANlDi_bEqXbCHPArNoGgErQ(aB3m_)mAeTrO'MsICM_aPnOuIaNlTER_COMPARE_AND_EXCHANGE(3)
2
3
4

NAME

6       qb_atomic_pointer_compare_and_exchange   -  Compares  oldval  with  the
7       pointer pointed to by atomic and if  they  are  equal,  atomically  ex‐
8       changes *atomic with newval.
9
10

SYNOPSIS

12       #include <qb/qbatomic.h>
13
14       int32_t qb_atomic_pointer_compare_and_exchange(
15           volatile void *QB_GNUC_MAY_ALIAS   *atomic,
16           void                               *oldval,
17           void                               *newval
18       );
19

PARAMS

21       atomic a pointer to a void*
22
23       oldval the assumed old value of *atomic
24
25       newval the new value of *atomic
26

DESCRIPTION

28       Also acts as a memory barrier.
29

RETURN VALUE

31       QB_TRUE if atomic was equal oldval, else QB_FALSE.
32

SEE ALSO

34       qb_atomic_int_set(3), qb_atomic_int_compare_and_exchange(3),
35       qb_atomic_int_get(3), qb_atomic_int_add(3), qb_atomic_init(3),
36       qb_atomic_pointer_get(3), qb_atomic_int_exchange_and_add(3),
37       qb_atomic_pointer_set(3)
38
40       Copyright (C) 2003 Sebastian Wilhelmi
41
42
43
44LIBQB                             2021Q-B0_3A-T0O3MIC_POINTER_COMPARE_AND_EXCHANGE(3)
Impressum