P99
#define atomic_load (   OBJP)
Value:
p99_extension                                                                     \
({                                                                                \
  P99_MACRO_PVAR(p00_objp, (OBJP));                                               \
  ((!atomic_is_lock_free(p00_objp))                                               \
   ? ({                                                                           \
       register __typeof__(P00_AX(p00_objp).p00_t) p00_ret;                       \
       P99_SPIN_EXCLUDE(&p00_objp->p00_lock)                                      \
         p00_ret = P00_AT(p00_objp);                                              \
       p00_ret;                                                                   \
     })                                                                           \
   : (P99_IF_EMPTY(P99_ATOMIC_LOCK_FREE_TYPES)                                    \
      (P00_AT(p00_objp))                                                          \
      ((__typeof__(P00_AX(p00_objp))){                                            \
            .p00_m =                                                              \
            P00_ATOMIC_TERN(p00_objp,                                             \
                            __sync_val_compare_and_swap(&P00_AM(p00_objp), 0, 0), \
                            P00_AM(p00_objp)),                                    \
            }).p00_t));                                                           \
 })

Return the value of the object behind OBJP.

Remarks:
this can be used in a context that is known to have a race condition
See also:
atomic_int

Definition at line 1126 of file p99_atomic.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines