diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1994-12-01 08:00:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1994-12-01 08:00:00 +0000 |
commit | 90ecc248e200fee448001248dde0ca540dd3ef64 (patch) | |
tree | a3fe89494ce63b4835f0f9cf5c45e74cde88252b /include/asm-i386/system.h | |
parent | 1513ff9b7899ab588401c89db0e99903dbf5f886 (diff) |
Import of Linux/MIPS 1.1.68
Diffstat (limited to 'include/asm-i386/system.h')
-rw-r--r-- | include/asm-i386/system.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 04c8b96b6..23af2e513 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h @@ -44,6 +44,16 @@ extern inline int tas(char * m) return res; } +/* + * atomic exchange + */ +#define atomic_exchange(m,r) \ + __asm__ __volatile__( \ + "xchgl %0,%2" \ + : "=r" ((r)) \ + : "0" ((r)), "m" (*(m)) \ + : "memory"); + #define save_flags(x) \ __asm__ __volatile__("pushfl ; popl %0":"=r" (x): /* no input */ :"memory") |