Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361347
b: refs/heads/master
c: 00c30e0
h: refs/heads/master
i:
  361345: a5e806e
  361343: c72b06c
v: v3
  • Loading branch information
Jonas Bonn committed Mar 13, 2013
1 parent 88f5374 commit 868c6af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4cb776f33c7343e805dc3d6dd71a80eff9f66f1
refs/heads/master: 00c30e0681bf5563c8670c0ab419886f56626430
6 changes: 0 additions & 6 deletions trunk/include/asm-generic/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@ static inline void atomic_dec(atomic_t *v)
#define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v)))
#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))

#define cmpxchg_local(ptr, o, n) \
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
(unsigned long)(n), sizeof(*(ptr))))

#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))

static inline int __atomic_add_unless(atomic_t *v, int a, int u)
{
int c, old;
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/asm-generic/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
*/
#include <asm-generic/cmpxchg-local.h>

#ifndef cmpxchg_local
#define cmpxchg_local(ptr, o, n) \
((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
(unsigned long)(n), sizeof(*(ptr))))
#endif

#ifndef cmpxchg64_local
#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
#endif

#define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n))
#define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n))

Expand Down

0 comments on commit 868c6af

Please sign in to comment.