patch-2.2.15 linux/include/asm-ppc/atomic.h
Next file: linux/include/asm-ppc/bitops.h
Previous file: linux/include/asm-mips/pgtable.h
Back to the patch index
Back to the overall index
- Lines: 95
- Date:
Fri Apr 21 12:46:49 2000
- Orig file:
v2.2.14/include/asm-ppc/atomic.h
- Orig date:
Mon Jan 12 23:18:13 1998
diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/include/asm-ppc/atomic.h linux/include/asm-ppc/atomic.h
@@ -28,94 +28,4 @@
extern void atomic_clear_mask(unsigned long mask, unsigned long *addr);
extern void atomic_set_mask(unsigned long mask, unsigned long *addr);
-#if 0 /* for now */
-extern __inline__ void atomic_add(atomic_t a, atomic_t *v)
-{
- atomic_t t;
-
- __asm__ __volatile__("\n\
-1: lwarx %0,0,%3\n\
- add %0,%2,%0\n\
- stwcx. %0,0,%3\n\
- bne 1b"
- : "=&r" (t), "=m" (*v)
- : "r" (a), "r" (v)
- : "cc");
-}
-
-extern __inline__ void atomic_sub(atomic_t a, atomic_t *v)
-{
- atomic_t t;
-
- __asm__ __volatile__("\n\
-1: lwarx %0,0,%3\n\
- subf %0,%2,%0\n\
- stwcx. %0,0,%3\n\
- bne 1b"
- : "=&r" (t), "=m" (*v)
- : "r" (a), "r" (v)
- : "cc");
-}
-
-extern __inline__ int atomic_sub_and_test(atomic_t a, atomic_t *v)
-{
- atomic_t t;
-
- __asm__ __volatile__("\n\
-1: lwarx %0,0,%3\n\
- subf %0,%2,%0\n\
- stwcx. %0,0,%3\n\
- bne 1b"
- : "=&r" (t), "=m" (*v)
- : "r" (a), "r" (v)
- : "cc");
-
- return t == 0;
-}
-
-extern __inline__ void atomic_inc(atomic_t *v)
-{
- atomic_t t;
-
- __asm__ __volatile__("\n\
-1: lwarx %0,0,%2\n\
- addic %0,%0,1\n\
- stwcx. %0,0,%2\n\
- bne 1b"
- : "=&r" (t), "=m" (*v)
- : "r" (v)
- : "cc");
-}
-
-extern __inline__ void atomic_dec(atomic_t *v)
-{
- atomic_t t;
-
- __asm__ __volatile__("\n\
-1: lwarx %0,0,%2\n\
- addic %0,%0,-1\n\
- stwcx. %0,0,%2\n\
- bne 1b"
- : "=&r" (t), "=m" (*v)
- : "r" (v)
- : "cc");
-}
-
-extern __inline__ int atomic_dec_and_test(atomic_t *v)
-{
- atomic_t t;
-
- __asm__ __volatile__("\n\
-1: lwarx %0,0,%2\n\
- addic %0,%0,-1\n\
- stwcx. %0,0,%2\n\
- bne 1b"
- : "=&r" (t), "=m" (*v)
- : "r" (v)
- : "cc");
-
- return t == 0;
-}
-#endif /* 0 */
-
#endif /* _ASM_PPC_ATOMIC_H_ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)