On 25 May 2011 04:45, Nicolas Pitre <nicolas.pi...@linaro.org> wrote:
> FWIW, here's what the kernel part might look like, i.e. for
> compatibility with pre ARMv6k systems (beware, only compile tested):

OK, so that makes a eglibc part for that pretty easy.
For things like fetch_and_add (which I can see membase needs)
would you expect implementation using this cmpxchg so it has a fall
back or just to use ldrexd directly which I assume would be somewhat
more efficient.

(Question holds for both eglibc and gcc's __sync_*)


> + * Notes:
> + *
> + *    - This routine already includes memory barriers as needed.

Hmm I wonder whether something like the atomic add primitives from user
space need that or not; it depends whether people are using them to build
larger data structures or just trying to keep a consistent count somewhere.

Dave

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to