On Mon, 3 Jan 2005, Alan Cox wrote:

> On Llu, 2005-01-03 at 18:31, Pete Zaitcev wrote:
> > Fist is SMP: volatile does nothing to help serialize accesses, although
> > I can see that in perhaps in this case it's not an issue. The second
> > is portability: on a few CPUs special instructions are necessary for
> > serializations, which are provided by memory barriers. I would suggest
> > adding barriers explicitly.
> 
> It also causes abominably bad code generation compared to explicit
> barriers. Consider volatile the wrong solution.

Alan, I respect your judgement and your advice.  If after looking more 
closely at this you still think the code should be changed to use barriers 
instead, I will do it.

But first you should read my reply to Pete, and you should see how the 
driver is affected.  You will be hard-pressed to find any spots where the 
"volatile" causes abominable code generation.

Alan Stern



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to