patch-2.3.48 linux/include/asm-i386/atomic.h
Next file: linux/include/asm-i386/hardirq.h
Previous file: linux/include/asm-arm/parport.h
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Sat Feb 26 20:45:57 2000
- Orig file:
v2.3.47/linux/include/asm-i386/atomic.h
- Orig date:
Tue Dec 7 09:32:49 1999
diff -u --recursive --new-file v2.3.47/linux/include/asm-i386/atomic.h linux/include/asm-i386/atomic.h
@@ -84,6 +84,17 @@
return c != 0;
}
+static __inline__ int atomic_inc_and_test(volatile atomic_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__(
+ LOCK "incl %0; sete %1"
+ :"=m" (__atomic_fool_gcc(v)), "=qm" (c)
+ :"m" (__atomic_fool_gcc(v)));
+ return c != 0;
+}
+
extern __inline__ int atomic_add_negative(int i, volatile atomic_t *v)
{
unsigned char c;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)