Re: [PATCH] [2.5] asm-generic/atomic.h and changes to arm, parisc,

Roman Zippel (zippel@linux-m68k.org)
Fri, 9 Aug 2002 00:27:39 +0200 (CEST)


Hi,

On 9 Aug 2002, Luca Barbieri wrote:

> - Didn't implement atomic_{add,sub,inc,dec}_return. This is currently
> not used in the generic kernel but it can be useful.

m68k has a cmpxchg like instruction, which can be used for that.

> - Had inline assembly for things the compiler should be able to generate
> on its own

The compiler can cache the value in a register, the assembly forces that
into memory. __ARCH_ATOMIC_HAVE_MEMORY_OPERANDS won't work because of
that.

bye, Roman

-
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/