Back to index

glibc  2.9
Defines | Typedefs | Functions
atomic.h File Reference
#include <stdint.h>
#include <sysdep.h>

Go to the source code of this file.

Defines

#define atomic_full_barrier()
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval)   ({ __arm_link_error (); oldval; })
#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval)   ({ __arm_link_error (); oldval; })
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval)
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval)   ({ __arm_link_error (); oldval; })

Typedefs

typedef int8_t atomic8_t
typedef uint8_t uatomic8_t
typedef int_fast8_t atomic_fast8_t
typedef uint_fast8_t uatomic_fast8_t
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 intptr_t atomicptr_t
typedef uintptr_t uatomicptr_t
typedef intmax_t atomic_max_t
typedef uintmax_t uatomic_max_t

Functions

void __arm_link_error (void)

Define Documentation

#define __arch_compare_and_exchange_val_16_acq (   mem,
  newval,
  oldval 
)    ({ __arm_link_error (); oldval; })

Definition at line 55 of file atomic.h.

#define __arch_compare_and_exchange_val_32_acq (   mem,
  newval,
  oldval 
)
Value:
({ register __typeof (oldval) a_oldval asm ("r0");                          \
     register __typeof (oldval) a_newval asm ("r1") = (newval);                    \
     register __typeof (mem) a_ptr asm ("r2") = (mem);                      \
     register __typeof (oldval) a_tmp asm ("r3");                           \
     register __typeof (oldval) a_oldval2 asm ("r4") = (oldval);            \
     __asm__ __volatile__                                            \
            ("0:\tldr\t%[tmp],[%[ptr]]\n\t"                                 \
             "cmp\t%[tmp], %[old2]\n\t"                              \
             "bne\t1f\n\t"                                           \
             "mov\t%[old], %[old2]\n\t"                              \
             "mov\t%[tmp], #0xffff0fff\n\t"                                 \
             "mov\tlr, pc\n\t"                                              \
             "add\tpc, %[tmp], #(0xffff0fc0 - 0xffff0fff)\n\t"              \
             "bcc\t0b\n\t"                                           \
             "mov\t%[tmp], %[old2]\n\t"                              \
             "1:"                                                    \
             : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp)                  \
             : [new] "r" (a_newval), [ptr] "r" (a_ptr),              \
              [old2] "r" (a_oldval2)                                        \
             : "ip", "lr", "cc", "memory");                                 \
     a_tmp; })

Definition at line 62 of file atomic.h.

#define __arch_compare_and_exchange_val_64_acq (   mem,
  newval,
  oldval 
)    ({ __arm_link_error (); oldval; })

Definition at line 85 of file atomic.h.

#define __arch_compare_and_exchange_val_8_acq (   mem,
  newval,
  oldval 
)    ({ __arm_link_error (); oldval; })

Definition at line 52 of file atomic.h.

#define atomic_full_barrier ( )
Value:
__asm__ __volatile__                                          \
            ("mov\tip, #0xffff0fff\n\t"                              \
             "mov\tlr, pc\n\t"                                              \
             "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)"                      \
             : : : "ip", "lr", "cc", "memory");

Definition at line 40 of file atomic.h.


Typedef Documentation

Definition at line 28 of file atomic.h.

typedef int8_t atomic8_t

Definition at line 23 of file atomic.h.

Definition at line 30 of file atomic.h.

Definition at line 25 of file atomic.h.

Definition at line 35 of file atomic.h.

Definition at line 33 of file atomic.h.

Definition at line 29 of file atomic.h.

Definition at line 24 of file atomic.h.

Definition at line 31 of file atomic.h.

Definition at line 26 of file atomic.h.

Definition at line 36 of file atomic.h.

Definition at line 34 of file atomic.h.


Function Documentation

void __arm_link_error ( void  )