Re: [PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock, 0) in kernel_kexec()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Eric W. Biederman <ebiederm@...>, <torvalds@...>, <ying.huang@...>, <pavel@...>, <nigel@...>, <rjw@...>, <vgoyal@...>, <mingo@...>, <linux-kernel@...>, <kexec@...>
Date: Wednesday, August 13, 2008 - 4:15 pm

On Wed, 2008-08-13 at 12:44 -0700, Andrew Morton wrote:


Yes, xchg() is guaranteed to be atomic. atomic_xchg() applies only to
the atomic_t type, and is almost always #defined to xchg().


You appear to be confusing xchg() with cmpxchg(). AFAIK, xchg() exists
on all architectures, and is used in several instances of generic code.
It is particularly extensively used in the networking layer.

Trond

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

Messages in current thread:
Re: [PATCH] kexec jump: fix compiling warning on xchg(&amp;k..., Eric W. Biederman, (Wed Aug 13, 2:12 pm)
Re: [PATCH] kexec jump: fix compiling warning on xchg(&k..., Trond Myklebust, (Wed Aug 13, 4:15 pm)