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
Diego Novillo wrote:
On Wed, May 04, 2005 at 02:47:14PM -0600, Chris Friesen wrote:
In multiple messages to comp.programming.threads he has stated that
volatile is not necessary between threads if you use the posix locking
functions, and in fact that one of the main purposes of the posix locks
Diego Novillo wrote:
On Wed, May 04, 2005 at 01:47:20PM -0600, Chris Friesen wrote:
Also, what about threads and pthread locking? Do I need to use volatile
there? If not, then what about using pthread locking between processes?
Things will only break for you when GCC pulls in function bodies
Mike Stump wrote:
On May 4, 2005, at 10:59 AM, Chris Friesen wrote:
If I share memory between two processes, and protect access to the
memory using standard locking (fcntl(), for instance), do I need to
specify that the memory is volatile?
It is safer to. People might compile your whole app
I'm not sure who I should address this to...I hope this is correct.
If I share memory between two processes, and protect access to the
memory using standard locking (fcntl(), for instance), do I need to
specify that the memory is volatile? Or is the fact that I'm using
fcntl() enough to force t