gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] shm, volatile, etc.


From: Eric S. Raymond
Subject: Re: [gpsd-dev] shm, volatile, etc.
Date: Tue, 5 Nov 2013 15:41:03 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Dave Platt <address@hidden>:
> But, based on the discussions cited above (and on the fact that I
> have personally been burned by mis-using "volatile" in just this
> fashion) I really don't think I'll ever depend on it again.

I'm aware of these issues.  I never *rely* on volatile, but I use it in
a belt-and-suspenders way.

Also, I think it has a use in conveying the programmer's intent to
human readers.  Whenever I see "volatile", I interpret it as a yellow 
flag that says "Concurrency issues! Slow down and use caution in 
modifying this code!"  I expect other experienced C programmers
to react similarly, and consciously deploy it as a warning.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]