Re: [cpuops cmpxchg double V1 1/4] Generic support for this_cpu_cmpxchg_double

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: H. Peter Anvin
Date: Tuesday, December 21, 2010 - 4:24 pm

On 12/21/2010 02:36 PM, Christoph Lameter wrote:

I'm a bit confused on this one.  The standard cmpxchg() takes a scalar
and a pointer, and returns a scalar.  The equivalent for the "double"
variety would be to return a compound object, basically:

struct double_ulong {
	unsigned long v[2];
};

... which can be returned in registers on both i386 and x86-64.

It's a bit clumsy from a type perspective, but I'm not sure that that is
a bad thing.  Doing too much type genericity has caused us problems in
the past.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[cpuops cmpxchg double V1 0/4] this_cpu_cmpxchg_double support, Christoph Lameter, (Tue Dec 14, 10:48 am)
[cpuops cmpxchg double V1 1/4] Generic support for this_cp ..., Christoph Lameter, (Tue Dec 14, 10:48 am)
[cpuops cmpxchg double V1 2/4] x86: this_cpu_cmpxchg_doubl ..., Christoph Lameter, (Tue Dec 14, 10:48 am)
[cpuops cmpxchg double V1 3/4] slub: Get rid of slab_free_ ..., Christoph Lameter, (Tue Dec 14, 10:48 am)
[cpuops cmpxchg double V1 4/4] Lockless (and preemptless) ..., Christoph Lameter, (Tue Dec 14, 10:48 am)
Re: [cpuops cmpxchg double V1 2/4] x86: this_cpu_cmpxchg_d ..., Christoph Lameter, (Wed Dec 15, 9:12 am)
Re: [cpuops cmpxchg double V1 2/4] x86: this_cpu_cmpxchg_d ..., Christoph Lameter, (Wed Dec 15, 9:20 am)
Re: [cpuops cmpxchg double V1 2/4] x86: this_cpu_cmpxchg_d ..., Christoph Lameter, (Wed Dec 15, 9:41 am)
Re: [cpuops cmpxchg double V1 2/4] x86: this_cpu_cmpxchg_d ..., Christoph Lameter, (Wed Dec 15, 10:53 am)
Re: [cpuops cmpxchg double V1 1/4] Generic support for thi ..., Christoph Lameter, (Tue Dec 21, 3:36 pm)
Re: [cpuops cmpxchg double V1 1/4] Generic support for thi ..., H. Peter Anvin, (Tue Dec 21, 4:24 pm)
Re: [cpuops cmpxchg double V1 1/4] Generic support for thi ..., Christoph Lameter, (Thu Dec 23, 5:16 pm)
Re: [cpuops cmpxchg double V1 1/4] Generic support for thi ..., Christoph Lameter, (Fri Dec 24, 9:53 pm)
Re: [cpuops cmpxchg double V1 1/4] Generic support for thi ..., Christoph Lameter, (Sat Dec 25, 4:55 pm)