Classes | Defines | Functions
oro_atomic.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  oro_atomic_t

Defines

#define __ASM_CONST(x)   x##UL
#define __stringify_in_c(...)   #__VA_ARGS__
#define ASM_CONST(x)   __ASM_CONST(x)
#define ISYNC_ON_SMP
#define LWSYNC   sync
#define LWSYNC_ON_SMP
#define oro_atomic_add_negative(a, v)   (oro_atomic_add_return((a), (v)) < 0)
#define oro_atomic_add_unless(v, a, u)
#define ORO_ATOMIC_CLEANUP(v)
#define oro_atomic_dec_and_test(v)   (oro_atomic_dec_return((v)) == 0)
#define oro_atomic_inc_and_test(v)   (oro_atomic_inc_return(v) == 0)
#define oro_atomic_inc_not_zero(v)   oro_atomic_add_unless((v), 1, 0)
#define ORO_ATOMIC_INIT(i)   { (i) }
#define oro_atomic_oro_cmpxchg(v, o, n)   ((int)oro_cmpxchg(&((v)->counter), (o), (n)))
#define oro_atomic_read(v)   ((v)->counter)
#define oro_atomic_set(v, i)   (((v)->counter) = (i))
#define ORO_ATOMIC_SETUP   oro_atomic_set
#define oro_atomic_sub_and_test(a, v)   (oro_atomic_sub_return((a), (v)) == 0)
#define oro_atomic_xchg(v, new)   (xchg(&((v)->counter), new))
#define PPC405_ERR77(ra, rb)
#define PPC405_ERR77_SYNC
#define PPC_CNTLZL   stringify_in_c(cntlzw)
#define PPC_LCMPI   stringify_in_c(cmpwi)
#define PPC_LL   stringify_in_c(lwz)
#define PPC_LLARX   stringify_in_c(lwarx)
#define PPC_LONG   stringify_in_c(.long)
#define PPC_STL   stringify_in_c(stw)
#define PPC_STLCX   stringify_in_c(stwcx.)
#define PPC_TLNEI   stringify_in_c(twnei)
#define smp_mb__after_oro_atomic_dec()   smp_mb()
#define smp_mb__after_oro_atomic_inc()   smp_mb()
#define smp_mb__before_oro_atomic_dec()   smp_mb()
#define smp_mb__before_oro_atomic_inc()   smp_mb()
#define stringify_in_c(...)   __stringify_in_c(__VA_ARGS__) " "

Functions

static void eieio (void)
static void isync (void)
static __inline__ void oro_atomic_add (oro_atomic_t *v, int n)
static __inline__ int oro_atomic_add_return (oro_atomic_t *v, int n)
static __inline__ void oro_atomic_dec (oro_atomic_t *v)
static __inline__ int oro_atomic_dec_if_positive (oro_atomic_t *v)
static __inline__ int oro_atomic_dec_return (oro_atomic_t *v)
static __inline__ void oro_atomic_inc (oro_atomic_t *v)
static __inline__ int oro_atomic_inc_return (oro_atomic_t *v)
static __inline__ void oro_atomic_sub (int a, oro_atomic_t *v)
static __inline__ int oro_atomic_sub_return (oro_atomic_t *v, int n)

Define Documentation

#define __ASM_CONST (   x)    x##UL

Definition at line 85 of file oro_atomic.h.

#define __stringify_in_c (   ...)    #__VA_ARGS__

Definition at line 83 of file oro_atomic.h.

#define ASM_CONST (   x)    __ASM_CONST(x)

Definition at line 86 of file oro_atomic.h.

#define ISYNC_ON_SMP

Definition at line 62 of file oro_atomic.h.

#define LWSYNC   sync

Definition at line 59 of file oro_atomic.h.

#define LWSYNC_ON_SMP

Definition at line 63 of file oro_atomic.h.

#define oro_atomic_add_negative (   a,
 
)    (oro_atomic_add_return((a), (v)) < 0)

Definition at line 160 of file oro_atomic.h.

#define oro_atomic_add_unless (   v,
  a,
 
)
Value:
({                                                      \
        int c, old;                                     \
        c = oro_atomic_read(v);                         \
        for (;;) {                                      \
                if (unlikely(c == (u)))                 \
                        break;                          \
                old = oro_atomic_oro_cmpxchg((v), c, c + (a));  \
                if (likely(old == c))                   \
                        break;                          \
                c = old;                                \
        }                                               \
        c != (u);                                       \
})

oro_atomic_add_unless - add unless the number is a given value : pointer of type oro_atomic_t : the amount to add to v... : ...unless v is equal to u.

Atomically adds to , so long as it was not . Returns non-zero if was not , and zero otherwise.

Definition at line 286 of file oro_atomic.h.

#define ORO_ATOMIC_CLEANUP (   v)

Definition at line 121 of file oro_atomic.h.

#define oro_atomic_dec_and_test (   v)    (oro_atomic_dec_return((v)) == 0)

Definition at line 303 of file oro_atomic.h.

#define oro_atomic_inc_and_test (   v)    (oro_atomic_inc_return(v) == 0)

Definition at line 238 of file oro_atomic.h.

#define oro_atomic_inc_not_zero (   v)    oro_atomic_add_unless((v), 1, 0)

Definition at line 300 of file oro_atomic.h.

#define ORO_ATOMIC_INIT (   i)    { (i) }

Definition at line 119 of file oro_atomic.h.

#define oro_atomic_oro_cmpxchg (   v,
  o,
 
)    ((int)oro_cmpxchg(&((v)->counter), (o), (n)))

Definition at line 274 of file oro_atomic.h.

#define oro_atomic_read (   v)    ((v)->counter)

Definition at line 123 of file oro_atomic.h.

#define oro_atomic_set (   v,
 
)    (((v)->counter) = (i))

Definition at line 124 of file oro_atomic.h.

Definition at line 120 of file oro_atomic.h.

#define oro_atomic_sub_and_test (   a,
 
)    (oro_atomic_sub_return((a), (v)) == 0)

Definition at line 302 of file oro_atomic.h.

#define oro_atomic_xchg (   v,
  new 
)    (xchg(&((v)->counter), new))

Definition at line 275 of file oro_atomic.h.

#define PPC405_ERR77 (   ra,
  rb 
)

Definition at line 106 of file oro_atomic.h.

Definition at line 107 of file oro_atomic.h.

#define PPC_CNTLZL   stringify_in_c(cntlzw)

Definition at line 97 of file oro_atomic.h.

#define PPC_LCMPI   stringify_in_c(cmpwi)

Definition at line 92 of file oro_atomic.h.

#define PPC_LL   stringify_in_c(lwz)

Definition at line 90 of file oro_atomic.h.

#define PPC_LLARX   stringify_in_c(lwarx)

Definition at line 95 of file oro_atomic.h.

#define PPC_LONG   stringify_in_c(.long)

Definition at line 93 of file oro_atomic.h.

#define PPC_STL   stringify_in_c(stw)

Definition at line 91 of file oro_atomic.h.

#define PPC_STLCX   stringify_in_c(stwcx.)

Definition at line 96 of file oro_atomic.h.

#define PPC_TLNEI   stringify_in_c(twnei)

Definition at line 94 of file oro_atomic.h.

#define smp_mb__after_oro_atomic_dec ( )    smp_mb()

Definition at line 331 of file oro_atomic.h.

#define smp_mb__after_oro_atomic_inc ( )    smp_mb()

Definition at line 333 of file oro_atomic.h.

#define smp_mb__before_oro_atomic_dec ( )    smp_mb()

Definition at line 330 of file oro_atomic.h.

#define smp_mb__before_oro_atomic_inc ( )    smp_mb()

Definition at line 332 of file oro_atomic.h.

#define stringify_in_c (   ...)    __stringify_in_c(__VA_ARGS__) " "

Definition at line 84 of file oro_atomic.h.


Function Documentation

static void eieio ( void  ) [inline, static]

Definition at line 65 of file oro_atomic.h.

static void isync ( void  ) [inline, static]

Definition at line 70 of file oro_atomic.h.

static __inline__ void oro_atomic_add ( oro_atomic_t v,
int  n 
) [static]

Definition at line 126 of file oro_atomic.h.

static __inline__ int oro_atomic_add_return ( oro_atomic_t v,
int  n 
) [static]

Definition at line 141 of file oro_atomic.h.

static __inline__ void oro_atomic_dec ( oro_atomic_t v) [static]

Definition at line 240 of file oro_atomic.h.

static __inline__ int oro_atomic_dec_if_positive ( oro_atomic_t v) [static]

Definition at line 309 of file oro_atomic.h.

static __inline__ int oro_atomic_dec_return ( oro_atomic_t v) [static]

Definition at line 255 of file oro_atomic.h.

static __inline__ void oro_atomic_inc ( oro_atomic_t v) [static]

Definition at line 196 of file oro_atomic.h.

static __inline__ int oro_atomic_inc_return ( oro_atomic_t v) [static]

Definition at line 211 of file oro_atomic.h.

static __inline__ void oro_atomic_sub ( int  a,
oro_atomic_t v 
) [static]

Definition at line 162 of file oro_atomic.h.

static __inline__ int oro_atomic_sub_return ( oro_atomic_t v,
int  n 
) [static]

Definition at line 177 of file oro_atomic.h.



rtt
Author(s): RTT Developers
autogenerated on Sat Jun 8 2019 18:46:35