Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
atomic64.h File Reference

Go to the source code of this file.

Data Structures

struct  atomic64_t
 

Macros

#define ATOMIC64_INIT(i)   { (i) }
 
#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_and_test(a, v)   (atomic64_sub_return((a), (v)) == 0)
 
#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)
 

Functions

long long atomic64_read (const atomic64_t *v)
 
void atomic64_set (atomic64_t *v, long long i)
 
void atomic64_add (long long a, atomic64_t *v)
 
long long atomic64_add_return (long long a, atomic64_t *v)
 
void atomic64_sub (long long a, atomic64_t *v)
 
long long atomic64_sub_return (long long a, atomic64_t *v)
 
long long atomic64_dec_if_positive (atomic64_t *v)
 
long long atomic64_cmpxchg (atomic64_t *v, long long o, long long n)
 
long long atomic64_xchg (atomic64_t *v, long long new)
 
int atomic64_add_unless (atomic64_t *v, long long a, long long u)
 

Macro Definition Documentation

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

Definition at line 32 of file atomic64.h.

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

Definition at line 37 of file atomic64.h.

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

Definition at line 39 of file atomic64.h.

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

Definition at line 38 of file atomic64.h.

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

Definition at line 33 of file atomic64.h.

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

Definition at line 35 of file atomic64.h.

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

Definition at line 40 of file atomic64.h.

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

Definition at line 34 of file atomic64.h.

#define ATOMIC64_INIT (   i)    { (i) }

Definition at line 19 of file atomic64.h.

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

Definition at line 36 of file atomic64.h.

Function Documentation

void atomic64_add ( long long  a,
atomic64_t v 
)

Definition at line 69 of file atomic64.c.

long long atomic64_add_return ( long long  a,
atomic64_t v 
)

Definition at line 80 of file atomic64.c.

int atomic64_add_unless ( atomic64_t v,
long long  a,
long long  u 
)

Definition at line 161 of file atomic64.c.

long long atomic64_cmpxchg ( atomic64_t v,
long long  o,
long long  n 
)

Definition at line 132 of file atomic64.c.

long long atomic64_dec_if_positive ( atomic64_t v)

Definition at line 117 of file atomic64.c.

long long atomic64_read ( const atomic64_t v)

Definition at line 45 of file atomic64.c.

void atomic64_set ( atomic64_t v,
long long  i 
)

Definition at line 58 of file atomic64.c.

void atomic64_sub ( long long  a,
atomic64_t v 
)

Definition at line 93 of file atomic64.c.

long long atomic64_sub_return ( long long  a,
atomic64_t v 
)

Definition at line 104 of file atomic64.c.

long long atomic64_xchg ( atomic64_t v,
long long  new 
)

Definition at line 147 of file atomic64.c.