Future directions

Hal Murray hmurray at megapathdsl.net
Tue Sep 17 05:26:08 UTC 2019


> gpsd installs gps.h, the header for libgps, in $PREFIX/include/gps.h
> I would assume similar for NTPsec: $PREFIX/include/ntpsec.h 

That would work, but it shows that ntpsec owns the SHM interface.

I was trying to split it out to emphasize that ntpsec can't just change it 
without a lot of thought and/or coordination.

Maybe what I'm trying to say is that the SHM API needs a version number that 
is separate from ntpsec and gpsd.


> First gpsd and NTPsec need to be on the same page (include file). Anything
> new would take a long time to replace the current API.  Too much stuff uses
> it. 

I think we need a new API that allows readers to be read only.

We can dance around the compatibility issues by using a new key to shmget for 
the new mode and having gpsd write to both.

The current struct has a comment describing a mode that tries to be read only, 
but doesn't get it right.  It's only got one counter.  We need 2.

The writer updates one before writing, then writes the data, then bumps the 
second counter.  The reader grabs the second counter, grabs the data, then 
grabs the first counter.  If the counters are the same and different from the 
last time, you have new data.



-- 
These are my opinions.  I hate spam.





More information about the devel mailing list