lkml.org 
[lkml]   [2006]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] spinlocks: remove 'volatile'
In-Reply-To: <Pine.LNX.4.64.0607061333190.3869@g5.osdl.org>

On Thu, 6 Jul 2006 13:34:14 -0700, Linus Torvalds wrote:

> > So I _think_ that we should change the "=m" to the much more correct "+m"
> > at the same time (or before - it's really a bug-fix regardless) as
> > removing the "volatile".
>
> Here's a first cut (UNTESTED!) for x86. I didn't check any other
> architectures, I bet they have similar problems.

> #define __raw_spin_unlock_string \
> "movb $1,%0" \
> - :"=m" (lock->slock) : : "memory"
> + :"+m" (lock->slock) : : "memory"

This really is just an overwrite of whatever is there. OTOH I can't see
how this change could hurt anything..

--
Chuck
"You can't read a newspaper if you can't read." --George W. Bush
-
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/

\
 
 \ /
  Last update: 2006-07-07 12:29    [W:0.044 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site