P99
#define atomic_fetch_max (   OBJP,
  OPERAND 
)
Value:
p99_extension                                                            \
({                                                                       \
  P99_MACRO_PVAR(p00_objp, (OBJP));                                      \
  P99_MACRO_VAR(p00_op, (OPERAND));                                      \
  P99_MACRO_VAR(p00_ret, atomic_load(p00_objp));                         \
  while (p00_ret <= p00_op) {                                            \
    if (atomic_compare_exchange_weak(p00_objp, &p00_ret, p00_op)) break; \
  }                                                                      \
  /* be sure that the result can not be used as an lvalue */             \
  register __typeof__(p00_ret = p00_ret) p00_r = p00_ret;                \
  p00_r;                                                                 \
 })

Definition at line 1325 of file p99_atomic.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines