Re: 386/smp issue with atomic_add_return()

From: Joshua Hudson
Date: Tue Apr 11 2006 - 23:13:21 EST


On 4/11/06, lepton <ytht.net@xxxxxxxxx> wrote:
> Hi
> Is there any smp box with 386 cpu?
> If it exist, then I think atomic_add_return has a problem.
> Just disabling local interrupts can not keep another cpu from entering this function.
> What do you think about this?
>
> This is the code (copied from 2.6.16.4):
>
> #ifdef CONFIG_M386
> no_xadd: /* Legacy 386 processor */
> local_irq_disable();
> __i = atomic_read(v);
> atomic_set(v, i + __i);
> local_irq_enable();
> return i + __i;
> #endif

If such a box exists (and I doubt), it is not a commody PC.
First x86 SMP motherboard I heard of was a P1 with two processors.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/