Messages in this thread | | | Date | Thu, 06 Jan 2011 14:05:05 -0800 | From | "H. Peter Anvin" <> | 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
| |