[ntp:hackers] [Gpsd-dev] Single-writer/many-reader consistency: Test program written & verified

Terje Mathisen terje at tmsw.no
Tue Mar 29 06:33:45 UTC 2011

Dave Hart wrote:
> On Tue, Mar 29, 2011 at 5:54 AM, Gary E. Miller<gem at rellim.com>  wrote:
>> The files say .cpp, but it looks like plain C. Â What am I missing?
> That most C compiles as C++ just fine?  Terje tossed it together using
> a Visual Studio new project wizard which defaults to .cpp filename and
> he didn't bother to rename it, is my guess.  I didn't even think about

That's absolutely correct:

Most of my q&d C code is C(++), basically plain C with a few of the more 
useful syntax cleanups from C++, i.e. like the ability to declare 
variables upon first use, and single-line comments etc.

For a production program I would definitely clean it up. :-)

> it.  I should have given the distinction in finer points of volatile
> between C and C++.
> Looking forward to a POSIX port...

So do I, as I said I'll write it if I have to.

- <Terje at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

More information about the hackers mailing list