patch-2.4.19 linux-2.4.19/include/asm-s390x/atomic.h
Next file: linux-2.4.19/include/asm-s390x/bitops.h
Previous file: linux-2.4.19/include/asm-s390/unistd.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/include/asm-s390x/atomic.h
- Orig date:
Fri Nov 9 14:11:15 2001
diff -urN linux-2.4.18/include/asm-s390x/atomic.h linux-2.4.19/include/asm-s390x/atomic.h
@@ -34,21 +34,8 @@
: "=&d" (old_val), "=&d" (new_val) \
: "a" (ptr), "d" (op_val) : "cc" );
-static __inline__ int atomic_read(atomic_t *v)
-{
- int retval;
- __asm__ __volatile__("bcr 15,0\n\t"
- "l %0,%1"
- : "=d" (retval) : "m" (*v) );
- return retval;
-}
-
-static __inline__ void atomic_set(atomic_t *v, int i)
-{
- __asm__ __volatile__("st %1,%0\n\t"
- "bcr 15,0"
- : "=m" (*v) : "d" (i) );
-}
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v,i) (((v)->counter) = (i))
static __inline__ void atomic_add(int i, atomic_t *v)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)