[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1218658504.9042.61.camel@localhost>
Date: Wed, 13 Aug 2008 16:15:04 -0400
From: Trond Myklebust <trond.myklebust@....uio.no>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
torvalds@...ux-foundation.org, ying.huang@...el.com, pavel@....cz,
nigel@...el.suspend2.net, rjw@...k.pl, vgoyal@...hat.com,
mingo@...e.hu, linux-kernel@...r.kernel.org,
kexec@...ts.infradead.org
Subject: Re: [PATCH] kexec jump: fix compiling warning on xchg(&kexec_lock,
0) in kernel_kexec()
On Wed, 2008-08-13 at 12:44 -0700, Andrew Morton wrote:
> - Is xchg() guaranteed to be atomic? That's what atomic_xchg() is for.
Yes, xchg() is guaranteed to be atomic. atomic_xchg() applies only to
the atomic_t type, and is almost always #defined to xchg().
> - xchg() isn't guaranteed to exist on all architectures. atomic_xchg() is.
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists