[ntp:questions] new driver development

Dave Hart davehart at gmail.com
Fri Mar 18 13:32:11 UTC 2011

On Fri, Mar 18, 2011 at 09:16 UTC, Martin Burnicki
<martin.burnicki at meinberg.de> wrote:
> I'm not familiar with POSIX SHM details, but from the point of view from SHM
> feeders (like gpsd) it would also be easier to say "you can use this with
> ntpd's driver 41" than to say "you can use this with driver 28, but you
> need to fudge flag1 to 1".

It is not clear to me the two drivers need to be side-by-side
differing implementations in one driver.  I suspect "server
127.127.28.x mode 2" can reasonably mean "using POSIX named shared
memory of the form /ntpshm/[unit]" and either the existing shm
structure, or a variant with fixed-sized elements.

While it is not unreasonable to require both gpsd and ntpd be 32-bit,
or 64-bit, for them to share memory with each other, there's no
benefit to variable-layout shared memory here, the values mostly fit
in fixed 32-bit fields.  The couple of time_t's are the exception, and
can be handled as unions of time_t and two 32-bit values to ensure
padding to 64-bit.

FYI, for those interested in ntpd and shm, you might consider joining
the gpsd-dev mailing list:


Dave Hart

More information about the questions mailing list