question on semantics

Chris Friesen cfriesen@nortel.com
Wed May 4 22:51:00 GMT 2005


Mike Stump wrote:
> On May 4, 2005, at 12:47 PM, Chris Friesen wrote:

>> One problem with using volatile is that it can destroy performance.

> Gosh, I was going to elaborate and give the more complete answer, but  
> decided against it, I was wrong.

Heh...sorry.  I've been trying to figure out who's responsible for what 
guarantees.  It's a bit confusing.

> I was going to say, you can insert memory barriers inside the, near  the 
> lock/unlock (or even, inside the lock/unlock code.  If your lock/ unlock 
> author has put them in there for you, then, trivially, you  don't even 
> need them.  Since this list doesn't cover pthreads, we are  the wrong 
> people to answer that question.

Okay, that makes sense.  Thanks for your comments.

Chris



More information about the Gcc mailing list