Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212987
b: refs/heads/master
c: c669112
h: refs/heads/master
i:
  212985: 4cefd5f
  212983: 8d2beff
v: v3
  • Loading branch information
Mathieu Lacage authored and Arnd Bergmann committed Oct 9, 2010
1 parent 64e8f59 commit 6cf3126
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 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: 8b9d40691e8f5e7e0c8fb839c2bad29c5e0888ce
refs/heads/master: c6691126636769bd22bfd7b55829f0373a93c1ce
20 changes: 1 addition & 19 deletions trunk/include/asm-generic/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/irqflags.h>

#include <asm/cmpxchg-local.h>
#include <asm/cmpxchg.h>

struct task_struct;

Expand Down Expand Up @@ -136,25 +137,6 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
#define xchg(ptr, x) \
((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))

static inline unsigned long __cmpxchg(volatile unsigned long *m,
unsigned long old, unsigned long new)
{
unsigned long retval;
unsigned long flags;

local_irq_save(flags);
retval = *m;
if (retval == old)
*m = new;
local_irq_restore(flags);
return retval;
}

#define cmpxchg(ptr, o, n) \
((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \
(unsigned long)(o), \
(unsigned long)(n)))

#endif /* !__ASSEMBLY__ */

#endif /* __KERNEL__ */
Expand Down

0 comments on commit 6cf3126

Please sign in to comment.