Back to index

glibc  2.9
Defines | Typedefs
atomic.h File Reference
#include <inttypes.h>
#include <sgidefs.h>

Go to the source code of this file.

Defines

#define MIPS_PUSH_MIPS2   ".set mips2\n\t"
#define MIPS_SYNC   sync
#define MIPS_SYNC_STR_2(X)   #X
#define MIPS_SYNC_STR_1(X)   MIPS_SYNC_STR_2(X)
#define MIPS_SYNC_STR   MIPS_SYNC_STR_1(MIPS_SYNC)
#define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq)   (abort (), __prev = __cmp = 0)
#define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq)   (abort (), __prev = __cmp = 0)
#define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq)
#define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq)   (abort (), __prev = __cmp = 0)
#define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq)
#define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq)
#define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq)
#define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq)
#define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq)
#define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq)
#define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq)
#define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq)
#define atomic_compare_and_exchange_bool_acq(mem, new, old)
#define atomic_compare_and_exchange_val_acq(mem, new, old)
#define atomic_compare_and_exchange_bool_rel(mem, new, old)
#define atomic_compare_and_exchange_val_rel(mem, new, old)
#define __arch_exchange_xxx_8_int(mem, newval, rel, acq)   (abort (), 0)
#define __arch_exchange_xxx_16_int(mem, newval, rel, acq)   (abort (), 0)
#define __arch_exchange_xxx_32_int(mem, newval, rel, acq)
#define __arch_exchange_xxx_64_int(mem, newval, rel, acq)   (abort (), 0)
#define atomic_exchange_acq(mem, value)   __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, "", MIPS_SYNC_STR)
#define atomic_exchange_rel(mem, value)   __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, MIPS_SYNC_STR, "")
#define __arch_exchange_and_add_8_int(mem, newval, rel, acq)   (abort (), (typeof(*mem)) 0)
#define __arch_exchange_and_add_16_int(mem, newval, rel, acq)   (abort (), (typeof(*mem)) 0)
#define __arch_exchange_and_add_32_int(mem, value, rel, acq)
#define __arch_exchange_and_add_64_int(mem, value, rel, acq)   (abort (), (typeof(*mem)) 0)
#define atomic_exchange_and_add(mem, value)
#define atomic_full_barrier()

Typedefs

typedef int32_t atomic32_t
typedef uint32_t uatomic32_t
typedef int_fast32_t atomic_fast32_t
typedef uint_fast32_t uatomic_fast32_t
typedef int64_t atomic64_t
typedef uint64_t uatomic64_t
typedef int_fast64_t atomic_fast64_t
typedef uint_fast64_t uatomic_fast64_t
typedef intptr_t atomicptr_t
typedef uintptr_t uatomicptr_t
typedef intmax_t atomic_max_t
typedef uintmax_t uatomic_max_t

Define Documentation

#define __arch_compare_and_exchange_bool_16_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq);   \
   !__cmp; })

Definition at line 117 of file atomic.h.

#define __arch_compare_and_exchange_bool_32_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq);   \
   !__cmp; })

Definition at line 122 of file atomic.h.

#define __arch_compare_and_exchange_bool_64_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq);   \
   !__cmp; })

Definition at line 127 of file atomic.h.

#define __arch_compare_and_exchange_bool_8_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq);    \
   !__cmp; })

Definition at line 112 of file atomic.h.

#define __arch_compare_and_exchange_val_16_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq);   \
   (typeof (*mem))__prev; })

Definition at line 140 of file atomic.h.

#define __arch_compare_and_exchange_val_32_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq);   \
   (typeof (*mem))__prev; })

Definition at line 145 of file atomic.h.

#define __arch_compare_and_exchange_val_64_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq);   \
   (typeof (*mem))__prev; })

Definition at line 150 of file atomic.h.

#define __arch_compare_and_exchange_val_8_int (   mem,
  new,
  old,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                   \
   __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq);    \
   (typeof (*mem))__prev; })

Definition at line 135 of file atomic.h.

#define __arch_compare_and_exchange_xxx_16_int (   mem,
  newval,
  oldval,
  rel,
  acq 
)    (abort (), __prev = __cmp = 0)

Definition at line 63 of file atomic.h.

#define __arch_compare_and_exchange_xxx_32_int (   mem,
  newval,
  oldval,
  rel,
  acq 
)
Value:
__asm__ __volatile__ (                                               \
     ".set    push\n\t"                                              \
     MIPS_PUSH_MIPS2                                                 \
     rel      "\n"                                                   \
     "1:\t"                                                          \
     "ll      %0,%4\n\t"                                             \
     "move    %1,$0\n\t"                                             \
     "bne     %0,%2,2f\n\t"                                          \
     "move    %1,%3\n\t"                                             \
     "sc      %1,%4\n\t"                                             \
     "beqz    %1,1b\n"                                               \
     acq      "\n\t"                                                 \
     ".set    pop\n"                                                 \
     "2:\n\t"                                                        \
             : "=&r" (__prev), "=&r" (__cmp)                                \
             : "r" (oldval), "r" (newval), "m" (*mem)                       \
             : "memory")

Definition at line 66 of file atomic.h.

#define __arch_compare_and_exchange_xxx_64_int (   mem,
  newval,
  oldval,
  rel,
  acq 
)    (abort (), __prev = __cmp = 0)

Definition at line 87 of file atomic.h.

#define __arch_compare_and_exchange_xxx_8_int (   mem,
  newval,
  oldval,
  rel,
  acq 
)    (abort (), __prev = __cmp = 0)

Definition at line 60 of file atomic.h.

#define __arch_exchange_and_add_16_int (   mem,
  newval,
  rel,
  acq 
)    (abort (), (typeof(*mem)) 0)

Definition at line 241 of file atomic.h.

#define __arch_exchange_and_add_32_int (   mem,
  value,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                         \
     __asm__ __volatile__ ("\n"                                             \
     ".set    push\n\t"                                              \
     MIPS_PUSH_MIPS2                                                 \
     rel      "\n"                                                   \
     "1:\t"                                                          \
     "ll      %0,%3\n\t"                                             \
     "addu    %1,%0,%2\n\t"                                          \
     "sc      %1,%3\n\t"                                             \
     "beqz    %1,1b\n"                                               \
     acq      "\n\t"                                                 \
     ".set    pop\n"                                                 \
     "2:\n\t"                                                        \
             : "=&r" (__prev), "=&r" (__cmp)                                \
             : "r" (value), "m" (*mem)                                      \
             : "memory");                                            \
  __prev; })

Definition at line 244 of file atomic.h.

#define __arch_exchange_and_add_64_int (   mem,
  value,
  rel,
  acq 
)    (abort (), (typeof(*mem)) 0)

Definition at line 265 of file atomic.h.

#define __arch_exchange_and_add_8_int (   mem,
  newval,
  rel,
  acq 
)    (abort (), (typeof(*mem)) 0)

Definition at line 238 of file atomic.h.

#define __arch_exchange_xxx_16_int (   mem,
  newval,
  rel,
  acq 
)    (abort (), 0)

Definition at line 182 of file atomic.h.

#define __arch_exchange_xxx_32_int (   mem,
  newval,
  rel,
  acq 
)
Value:
({ typeof (*mem) __prev; int __cmp;                                         \
     __asm__ __volatile__ ("\n"                                             \
     ".set    push\n\t"                                              \
     MIPS_PUSH_MIPS2                                                 \
     rel      "\n"                                                   \
     "1:\t"                                                          \
     "ll      %0,%3\n\t"                                             \
     "move    %1,%2\n\t"                                             \
     "sc      %1,%3\n\t"                                             \
     "beqz    %1,1b\n"                                               \
     acq      "\n\t"                                                 \
     ".set    pop\n"                                                 \
     "2:\n\t"                                                        \
             : "=&r" (__prev), "=&r" (__cmp)                                \
             : "r" (newval), "m" (*mem)                              \
             : "memory");                                            \
  __prev; })

Definition at line 185 of file atomic.h.

#define __arch_exchange_xxx_64_int (   mem,
  newval,
  rel,
  acq 
)    (abort (), 0)

Definition at line 206 of file atomic.h.

#define __arch_exchange_xxx_8_int (   mem,
  newval,
  rel,
  acq 
)    (abort (), 0)

Definition at line 179 of file atomic.h.

#define atomic_compare_and_exchange_bool_acq (   mem,
  new,
  old 
)
Value:
__atomic_bool_bysize (__arch_compare_and_exchange_bool, int,   \
                      mem, new, old, "", MIPS_SYNC_STR)

Definition at line 157 of file atomic.h.

#define atomic_compare_and_exchange_bool_rel (   mem,
  new,
  old 
)
Value:
__atomic_bool_bysize (__arch_compare_and_exchange_bool, int,   \
                      mem, new, old, MIPS_SYNC_STR, "")

Definition at line 167 of file atomic.h.

#define atomic_compare_and_exchange_val_acq (   mem,
  new,
  old 
)
Value:
__atomic_val_bysize (__arch_compare_and_exchange_val, int,     \
                     mem, new, old, "", MIPS_SYNC_STR)

Definition at line 161 of file atomic.h.

#define atomic_compare_and_exchange_val_rel (   mem,
  new,
  old 
)
Value:
__atomic_val_bysize (__arch_compare_and_exchange_val, int,     \
                     mem, new, old, MIPS_SYNC_STR, "")

Definition at line 171 of file atomic.h.

#define atomic_exchange_acq (   mem,
  value 
)    __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, "", MIPS_SYNC_STR)

Definition at line 229 of file atomic.h.

#define atomic_exchange_and_add (   mem,
  value 
)
Value:
__atomic_val_bysize (__arch_exchange_and_add, int, mem, value,       \
                     MIPS_SYNC_STR, MIPS_SYNC_STR)

Definition at line 290 of file atomic.h.

#define atomic_exchange_rel (   mem,
  value 
)    __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, MIPS_SYNC_STR, "")

Definition at line 232 of file atomic.h.

#define atomic_full_barrier ( )
Value:
__asm__ __volatile__ (".set push\n\t"                                       \
                     MIPS_PUSH_MIPS2                                        \
                     MIPS_SYNC_STR "\n\t"                            \
                     ".set pop" : : : "memory")

Definition at line 297 of file atomic.h.

#define MIPS_PUSH_MIPS2   ".set mips2\n\t"

Definition at line 42 of file atomic.h.

#define MIPS_SYNC   sync

Definition at line 49 of file atomic.h.

Definition at line 54 of file atomic.h.

#define MIPS_SYNC_STR_1 (   X)    MIPS_SYNC_STR_2(X)

Definition at line 53 of file atomic.h.

#define MIPS_SYNC_STR_2 (   X)    #X

Definition at line 52 of file atomic.h.


Typedef Documentation

Definition at line 26 of file atomic.h.

Definition at line 31 of file atomic.h.

Definition at line 28 of file atomic.h.

Definition at line 33 of file atomic.h.

Definition at line 38 of file atomic.h.

Definition at line 36 of file atomic.h.

Definition at line 27 of file atomic.h.

Definition at line 32 of file atomic.h.

Definition at line 29 of file atomic.h.

Definition at line 34 of file atomic.h.

Definition at line 39 of file atomic.h.

Definition at line 37 of file atomic.h.