patch-2.1.130 linux/include/asm-m68k/atomic.h
Next file: linux/include/linux/console.h
Previous file: linux/include/asm-i386/unistd.h
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Fri Nov 20 11:43:55 1998
- Orig file:
v2.1.129/linux/include/asm-m68k/atomic.h
- Orig date:
Sat May 24 09:10:24 1997
diff -u --recursive --new-file v2.1.129/linux/include/asm-m68k/atomic.h linux/include/asm-m68k/atomic.h
@@ -18,35 +18,35 @@
static __inline__ void atomic_add(int i, atomic_t *v)
{
- __asm__ __volatile__("addl %1,%0" : : "m" (*v), "id" (i));
+ __asm__ __volatile__("addl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
}
static __inline__ void atomic_sub(int i, atomic_t *v)
{
- __asm__ __volatile__("subl %1,%0" : : "m" (*v), "id" (i));
+ __asm__ __volatile__("subl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
}
static __inline__ void atomic_inc(volatile atomic_t *v)
{
- __asm__ __volatile__("addql #1,%0" : : "m" (*v));
+ __asm__ __volatile__("addql #1,%0" : "=m" (*v): "0" (*v));
}
static __inline__ void atomic_dec(volatile atomic_t *v)
{
- __asm__ __volatile__("subql #1,%0" : : "m" (*v));
+ __asm__ __volatile__("subql #1,%0" : "=m" (*v): "0" (*v));
}
static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
{
char c;
- __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c) : "m" (*v));
+ __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "=m" (*v): "1" (*v));
return c != 0;
}
#define atomic_clear_mask(mask, v) \
- __asm__ __volatile__("andl %1,%0" : : "m" (*v), "id" (~(mask)))
+ __asm__ __volatile__("andl %1,%0" : "=m" (*v) : "id" (~(mask)),"0"(*v))
#define atomic_set_mask(mask, v) \
- __asm__ __volatile__("orl %1,%0" : : "m" (*v), "id" (mask));
+ __asm__ __volatile__("orl %1,%0" : "=m" (*v) : "id" (mask),"0"(*v))
#endif /* __ARCH_M68K_ATOMIC __ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov