Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it
From: Russell King (rmk@arm.linux.org.uk)
Date: Thu Aug 08 2002 - 18:29:58 EST
- Next message: Adam J. Richter: "Re: USBLP_WRITE_TIMEOUT too short for Kyocera FS-1010."
- Previous message: Luca Barbieri: "Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- In reply to: Luca Barbieri: "[PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Next in thread: Luca Barbieri: "[PATCH] [2.5] (v2) asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Reply: Luca Barbieri: "[PATCH] [2.5] (v2) asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Thu, Aug 08, 2002 at 11:43:15PM +0200, Luca Barbieri wrote:
>...
Please don't do this for ARM.
> -static inline int atomic_dec_and_test(volatile atomic_t *v)
> -{
> - unsigned long flags;
> - int val;
> -
> - local_irq_save(flags);
> - val = v->counter;
> - v->counter = val -= 1;
> - local_irq_restore(flags);
> -
> - return val == 0;
> -}
This C code is carefully optimised to allow the compiler to order things
efficiently.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Next message: Adam J. Richter: "Re: USBLP_WRITE_TIMEOUT too short for Kyocera FS-1010."
- Previous message: Luca Barbieri: "Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- In reply to: Luca Barbieri: "[PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Next in thread: Luca Barbieri: "[PATCH] [2.5] (v2) asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Reply: Luca Barbieri: "[PATCH] [2.5] (v2) asm-generic/atomic.h and changes to arm, parisc, mips, m68k, sh, cris to use it"
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
This archive was generated by hypermail 2b29
: Thu Aug 15 2002 - 22:00:18 EST