lkml.org 
[lkml]   [2011]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-01-06 23:09    [W:0.166 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site