Re: [PATCH 1/2] FRV: Implement atomic64_t

From: Ingo Molnar
Date: Fri Jul 03 2009 - 07:27:04 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> Good point. I've done a simple:
>
> u64 atomic64_read(atomic64_t *ptr)
> {
> return cmpxchg8b(ptr, 0, 0);
> }

-1 is better i guess, as that way we can avoid dirtying the
cacheline. Zero is way too common for atomics.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/