Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
atomic_32.h File Reference
#include <asm/barrier.h>
#include <arch/chip.h>

Go to the source code of this file.

Data Structures

struct  atomic64_t
 
struct  __get_user
 

Macros

#define ATOMIC64_INIT(val)   { (val) }
 
#define atomic64_add_negative(a, v)   (atomic64_add_return((a), (v)) < 0)
 
#define atomic64_inc(v)   atomic64_add(1LL, (v))
 
#define atomic64_inc_return(v)   atomic64_add_return(1LL, (v))
 
#define atomic64_inc_and_test(v)   (atomic64_inc_return(v) == 0)
 
#define atomic64_sub_return(i, v)   atomic64_add_return(-(i), (v))
 
#define atomic64_sub_and_test(a, v)   (atomic64_sub_return((a), (v)) == 0)
 
#define atomic64_sub(i, v)   atomic64_add(-(i), (v))
 
#define atomic64_dec(v)   atomic64_sub(1LL, (v))
 
#define atomic64_dec_return(v)   atomic64_sub_return(1LL, (v))
 
#define atomic64_dec_and_test(v)   (atomic64_dec_return((v)) == 0)
 
#define atomic64_inc_not_zero(v)   atomic64_add_unless((v), 1LL, 0LL)
 
#define smp_mb__before_atomic_dec()   smp_mb()
 
#define smp_mb__before_atomic_inc()   smp_mb()
 
#define smp_mb__after_atomic_dec()   do { } while (0)
 
#define smp_mb__after_atomic_inc()   do { } while (0)
 
#define ATOMIC_LOCKS_FOUND_VIA_TABLE()   (!CHIP_HAS_CBOX_HOME_MAP() && defined(CONFIG_SMP))
 
#define ATOMIC_HASH_SHIFT   (PAGE_SHIFT - 3)
 
#define ATOMIC_HASH_SIZE   (1 << ATOMIC_HASH_SHIFT)
 
#define ATOMIC_LOCK_REG   20
 
#define ATOMIC_LOCK_REG_NAME   r20
 

Functions

int _atomic_xchg (atomic_t *v, int n)
 
int _atomic_xchg_add (atomic_t *v, int i)
 
int _atomic_xchg_add_unless (atomic_t *v, int a, int u)
 
int _atomic_cmpxchg (atomic_t *v, int o, int n)
 
u64 _atomic64_xchg (atomic64_t *v, u64 n)
 
u64 _atomic64_xchg_add (atomic64_t *v, u64 i)
 
u64 _atomic64_xchg_add_unless (atomic64_t *v, u64 a, u64 u)
 
u64 _atomic64_cmpxchg (atomic64_t *v, u64 o, u64 n)
 
void __init_atomic_per_cpu (void)
 
int__atomic_hashed_lock (volatile void *v)
 
struct __get_user __atomic_cmpxchg (volatile int *p, int *lock, int o, int n)
 
struct __get_user __atomic_xchg (volatile int *p, int *lock, int n)
 
struct __get_user __atomic_xchg_add (volatile int *p, int *lock, int n)
 
struct __get_user __atomic_xchg_add_unless (volatile int *p, int *lock, int o, int n)
 
struct __get_user __atomic_or (volatile int *p, int *lock, int n)
 
struct __get_user __atomic_andn (volatile int *p, int *lock, int n)
 
struct __get_user __atomic_xor (volatile int *p, int *lock, int n)
 
u64 __atomic64_cmpxchg (volatile u64 *p, int *lock, u64 o, u64 n)
 
u64 __atomic64_xchg (volatile u64 *p, int *lock, u64 n)
 
u64 __atomic64_xchg_add (volatile u64 *p, int *lock, u64 n)
 
u64 __atomic64_xchg_add_unless (volatile u64 *p, int *lock, u64 o, u64 n)
 
struct __get_user __atomic_bad_address (int __user *addr)
 

Variables

int atomic_locks []
 

Macro Definition Documentation

#define atomic64_add_negative (   a,
  v 
)    (atomic64_add_return((a), (v)) < 0)

Definition at line 226 of file atomic_32.h.

#define atomic64_dec (   v)    atomic64_sub(1LL, (v))

Definition at line 233 of file atomic_32.h.

#define atomic64_dec_and_test (   v)    (atomic64_dec_return((v)) == 0)

Definition at line 235 of file atomic_32.h.

#define atomic64_dec_return (   v)    atomic64_sub_return(1LL, (v))

Definition at line 234 of file atomic_32.h.

#define atomic64_inc (   v)    atomic64_add(1LL, (v))

Definition at line 227 of file atomic_32.h.

#define atomic64_inc_and_test (   v)    (atomic64_inc_return(v) == 0)

Definition at line 229 of file atomic_32.h.

#define atomic64_inc_not_zero (   v)    atomic64_add_unless((v), 1LL, 0LL)

Definition at line 236 of file atomic_32.h.

#define atomic64_inc_return (   v)    atomic64_add_return(1LL, (v))

Definition at line 228 of file atomic_32.h.

#define ATOMIC64_INIT (   val)    { (val) }

Definition at line 120 of file atomic_32.h.

#define atomic64_sub (   i,
  v 
)    atomic64_add(-(i), (v))

Definition at line 232 of file atomic_32.h.

#define atomic64_sub_and_test (   a,
  v 
)    (atomic64_sub_return((a), (v)) == 0)

Definition at line 231 of file atomic_32.h.

#define atomic64_sub_return (   i,
  v 
)    atomic64_add_return(-(i), (v))

Definition at line 230 of file atomic_32.h.

#define ATOMIC_HASH_SHIFT   (PAGE_SHIFT - 3)

Definition at line 277 of file atomic_32.h.

#define ATOMIC_HASH_SIZE   (1 << ATOMIC_HASH_SHIFT)

Definition at line 278 of file atomic_32.h.

#define ATOMIC_LOCK_REG   20

Definition at line 294 of file atomic_32.h.

#define ATOMIC_LOCK_REG_NAME   r20

Definition at line 295 of file atomic_32.h.

#define ATOMIC_LOCKS_FOUND_VIA_TABLE ( )    (!CHIP_HAS_CBOX_HOME_MAP() && defined(CONFIG_SMP))

Definition at line 255 of file atomic_32.h.

#define smp_mb__after_atomic_dec ( )    do { } while (0)

Definition at line 246 of file atomic_32.h.

#define smp_mb__after_atomic_inc ( )    do { } while (0)

Definition at line 247 of file atomic_32.h.

#define smp_mb__before_atomic_dec ( )    smp_mb()

Definition at line 244 of file atomic_32.h.

#define smp_mb__before_atomic_inc ( )    smp_mb()

Definition at line 245 of file atomic_32.h.

Function Documentation

u64 __atomic64_cmpxchg ( volatile u64 p,
int lock,
u64  o,
u64  n 
)
u64 __atomic64_xchg ( volatile u64 p,
int lock,
u64  n 
)
u64 __atomic64_xchg_add ( volatile u64 p,
int lock,
u64  n 
)
u64 __atomic64_xchg_add_unless ( volatile u64 p,
int lock,
u64  o,
u64  n 
)
struct __get_user __atomic_andn ( volatile int p,
int lock,
int  n 
)
read
struct __get_user __atomic_bad_address ( int __user addr)
read

Definition at line 203 of file atomic_32.c.

struct __get_user __atomic_cmpxchg ( volatile int p,
int lock,
int  o,
int  n 
)
read
int* __atomic_hashed_lock ( volatile void v)

Definition at line 52 of file atomic_32.c.

struct __get_user __atomic_or ( volatile int p,
int lock,
int  n 
)
read
struct __get_user __atomic_xchg ( volatile int p,
int lock,
int  n 
)
read
struct __get_user __atomic_xchg_add ( volatile int p,
int lock,
int  n 
)
read
struct __get_user __atomic_xchg_add_unless ( volatile int p,
int lock,
int  o,
int  n 
)
read
struct __get_user __atomic_xor ( volatile int p,
int lock,
int  n 
)
read
void __init_atomic_per_cpu ( void  )

Definition at line 220 of file atomic_32.c.

u64 _atomic64_cmpxchg ( atomic64_t v,
u64  o,
u64  n 
)

Definition at line 186 of file atomic_32.c.

u64 _atomic64_xchg ( atomic64_t v,
u64  n 
)

Definition at line 162 of file atomic_32.c.

u64 _atomic64_xchg_add ( atomic64_t v,
u64  i 
)

Definition at line 168 of file atomic_32.c.

u64 _atomic64_xchg_add_unless ( atomic64_t v,
u64  a,
u64  u 
)

Definition at line 174 of file atomic_32.c.

int _atomic_cmpxchg ( atomic_t v,
int  o,
int  n 
)

Definition at line 137 of file atomic_32.c.

int _atomic_xchg ( atomic_t v,
int  n 
)

Definition at line 113 of file atomic_32.c.

int _atomic_xchg_add ( atomic_t v,
int  i 
)

Definition at line 119 of file atomic_32.c.

int _atomic_xchg_add_unless ( atomic_t v,
int  a,
int  u 
)

Definition at line 125 of file atomic_32.c.

Variable Documentation

int atomic_locks[]