lkml.org 
[lkml]   [2009]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] FRV: Implement atomic64_t

* Ingo Molnar <mingo@elte.hu> 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


\
 
 \ /
  Last update: 2009-07-03 13:29    [W:0.188 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site