Messages in this thread |  | | | Date | Fri, 22 Feb 2008 08:43:38 -0500 (EST) | | From | Steven Rostedt <> | | Subject | Re: [PATCH [RT] 05/14] rearrange rt_spin_lock sleep |
On Fri, 22 Feb 2008, Ingo Molnar wrote:
>
> * Gregory Haskins <gregory.haskins.ml@gmail.com> wrote:
>
> > My assumption is that the xchg() (inside update_current()) acts as an
> > effective wmb(). If xchg() does not have this property, then this
> > code is broken and patch 6/14 should also add a:
>
> xchg() is a strong implicit memory barrier, it implies smp_mb().
> (historic sidenote: it was the very first SMP primitive we had in
> Linux.)
OK, I've been proven wrong ;-)
I was just thinking of how an arch would implement it. No need for memory
barriers in just an xchg. But if Linux "implies it" then that's another
story.
Thanks,
-- Steve
/me learns something new everyday.
|  |