Back to index

glibc  2.9
Defines
atomic.h File Reference

Go to the source code of this file.

Defines

#define MUTEX_HINT_ACQ
#define MUTEX_HINT_REL
#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval)
#define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval)
#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval)   (abort (), 0)
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval)   (abort (), (__typeof (*mem)) 0)
#define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval)   (abort (), 0)
#define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval)   (abort (), (__typeof (*mem)) 0)
#define __arch_atomic_exchange_64_acq(mem, value)   ({ abort (); (*mem) = (value); })
#define __arch_atomic_exchange_64_rel(mem, value)   ({ abort (); (*mem) = (value); })
#define __arch_atomic_exchange_and_add_64(mem, value)   ({ abort (); (*mem) = (value); })
#define __arch_atomic_increment_val_64(mem)   ({ abort (); (*mem)++; })
#define __arch_atomic_decrement_val_64(mem)   ({ abort (); (*mem)--; })
#define __arch_atomic_decrement_if_positive_64(mem)   ({ abort (); (*mem)--; })
#define atomic_read_barrier()   __asm ("sync" ::: "memory")

Define Documentation

#define __arch_atomic_decrement_if_positive_64 (   mem)    ({ abort (); (*mem)--; })

Definition at line 105 of file atomic.h.

#define __arch_atomic_decrement_val_64 (   mem)    ({ abort (); (*mem)--; })

Definition at line 102 of file atomic.h.

#define __arch_atomic_exchange_64_acq (   mem,
  value 
)    ({ abort (); (*mem) = (value); })

Definition at line 90 of file atomic.h.

#define __arch_atomic_exchange_64_rel (   mem,
  value 
)    ({ abort (); (*mem) = (value); })

Definition at line 93 of file atomic.h.

#define __arch_atomic_exchange_and_add_64 (   mem,
  value 
)    ({ abort (); (*mem) = (value); })

Definition at line 96 of file atomic.h.

#define __arch_atomic_increment_val_64 (   mem)    ({ abort (); (*mem)++; })

Definition at line 99 of file atomic.h.

#define __arch_compare_and_exchange_bool_32_acq (   mem,
  newval,
  oldval 
)
Value:
({                                                                   \
  unsigned int __tmp;                                                       \
  __asm __volatile (                                                 \
                  "1:       lwarx  %0,0,%1" MUTEX_HINT_ACQ "\n"                    \
                  "  subf.  %0,%2,%0\n"                              \
                  "  bne    2f\n"                                    \
                  "  stwcx. %3,0,%1\n"                               \
                  "  bne-   1b\n"                                    \
                  "2:       " __ARCH_ACQ_INSTR                              \
                  : "=&r" (__tmp)                                    \
                  : "b" (mem), "r" (oldval), "r" (newval)                   \
                  : "cr0", "memory");                                       \
  __tmp != 0;                                                        \
})

Definition at line 43 of file atomic.h.

#define __arch_compare_and_exchange_bool_32_rel (   mem,
  newval,
  oldval 
)
Value:
({                                                                   \
  unsigned int __tmp;                                                       \
  __asm __volatile (__ARCH_REL_INSTR "\n"                            \
                  "1:       lwarx  %0,0,%1" MUTEX_HINT_REL "\n"                    \
                  "  subf.  %0,%2,%0\n"                              \
                  "  bne    2f\n"                                    \
                  "  stwcx. %3,0,%1\n"                               \
                  "  bne-   1b\n"                                    \
                  "2:       "                                               \
                  : "=&r" (__tmp)                                    \
                  : "b" (mem), "r" (oldval), "r" (newval)                   \
                  : "cr0", "memory");                                       \
  __tmp != 0;                                                        \
})

Definition at line 59 of file atomic.h.

#define __arch_compare_and_exchange_bool_64_acq (   mem,
  newval,
  oldval 
)    (abort (), 0)

Definition at line 78 of file atomic.h.

#define __arch_compare_and_exchange_bool_64_rel (   mem,
  newval,
  oldval 
)    (abort (), 0)

Definition at line 84 of file atomic.h.

#define __arch_compare_and_exchange_val_64_acq (   mem,
  newval,
  oldval 
)    (abort (), (__typeof (*mem)) 0)

Definition at line 81 of file atomic.h.

#define __arch_compare_and_exchange_val_64_rel (   mem,
  newval,
  oldval 
)    (abort (), (__typeof (*mem)) 0)

Definition at line 87 of file atomic.h.

#define atomic_read_barrier ( )    __asm ("sync" ::: "memory")

Definition at line 127 of file atomic.h.

#define MUTEX_HINT_ACQ

Definition at line 33 of file atomic.h.

#define MUTEX_HINT_REL

Definition at line 34 of file atomic.h.