Messages in this thread |  | | | Subject | Re: [PATCH -tip] x86: atomic64: inline atomic64_read() | | From | Andi Kleen <> | | Date | Fri, 03 Jul 2009 20:24:22 +0200 |
Arjan van de Ven <arjan@infradead.org> writes:
> On Fri, 3 Jul 2009 20:04:50 +0200 > Ingo Molnar <mingo@elte.hu> wrote: > >> > +static inline u64 atomic64_read(atomic64_t *ptr) >> > +{ >> > + u64 res; >> > + >> > + asm volatile( >> > + "mov %%ebx, %%eax\n\t" >> > + "mov %%ecx, %%edx\n\t" >> > + LOCK_PREFIX "cmpxchg8b %1\n" > > also afaik cmpxchg implies the lock prefix, so no need to make an > explicit one... it just adds code size and alternatives-work
No it doesn't; LOCK is implied for "xchg", but not for cmpxchg
-Andi
-- ak@linux.intel.com -- Speaking for myself only.
|  |