[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D263C91.30709@zytor.com>
Date: Thu, 06 Jan 2011 14:05:05 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Christoph Lameter <cl@...ux.com>
CC: Tejun Heo <tj@...nel.org>, akpm@...ux-foundation.org,
Pekka Enberg <penberg@...helsinki.fi>,
linux-kernel@...r.kernel.org,
Eric Dumazet <eric.dumazet@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [cpuops cmpxchg double V2 1/4] Generic support for this_cpu_cmpxchg_double
On 01/06/2011 12:45 PM, Christoph Lameter wrote:
> Introduce this_cpu_cmpxchg_double. this_cpu_cmpxchg_double() allows the
> comparision between two consecutive words and replaces them if there is
> a match.
>
> bool this_cpu_cmpxchg_double(pcp1, pcp2,
> old_word1, old_word2, new_word1, new_word2)
>
> this_cpu_cmpxchg_double does not return the old value (difficult since
> there are two words) but a boolean indicating if the operation was
> successful.
>
> The first percpu variable must be double word aligned!
I really truly hate this interface. The whole notion of passing two
pointers where only one is really used, is just painful.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists