Re: Atomic operations

Richard B. Johnson (root@chaos.analogic.com)
Mon, 3 Jun 2002 17:30:31 -0400 (EDT)


On Mon, 3 Jun 2002, Thunder from the hill wrote:

> Hi,
>
> On Mon, 3 Jun 2002, Richard B. Johnson wrote:
> > atomic_t test_and_set(int i, atomic_t *v)
> > {
> > int ret;
> >
> > __asm__ __volatile__(LOCK "movl (%1), %ecx\n"
> > LOCK "orl %0, (%1)\n"
> > : "ecx" (ret)
> > : "r" (i), "m" (v)
> > : "ecx", "memory" );
> >
> > return (ret & i);
> > }
>
> I'm not an expert, but shouldn't "exc" be quoted here? I'm just
ecx
Yes, we both make typos!
> wondering...

Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

Windows-2000/Professional isn't.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/