Yo All!

Consider the a wishlist item as changes would be a bit jarring.

I'd like to see "struct shmTimme" cleaned up and move into a header file
for system use..  Right now it is not in any header file, so clients
like gpsd need their own copies.

Here is the current definition from attic/sht.c
 
struct shmTime {
        int    mode; /* 0 - if valid set
                      *       use values,
                      *       clear valid
                      * 1 - if valid set
                      *       if count before and after read of values is equal,
                      *         use values
                      *       clear valid
                      */
        volatile int    count;
        time_t          clockTimeStampSec;
        int             clockTimeStampUSec;
        time_t          receiveTimeStampSec;
        int             receiveTimeStampUSec;
        int             leap;
        int             precision;
        int             nsamples;
        volatile int    valid;
        unsigned        clockTimeStampNSec;     /* Unsigned ns timestamps */
        unsigned        receiveTimeStampNSec;   /* Unsigned ns timestamps */
};

And a slightly different one in ntpd/refclock_shm.c:

struct shmTime {
        int    mode; /* 0 - if valid is set:
                      *       use values,
                      *       clear valid
                      * 1 - if valid is set:
                      *       if count before and after read of values is equal,
                      *         use values
                      *       clear valid
                      */
        volatile int    count;
        time_t          clockTimeStampSec;
        int             clockTimeStampUSec;
        time_t          receiveTimeStampSec;
        int             receiveTimeStampUSec;
        int             leap;
        int             precision;
        int             nsamples;
        volatile int    valid;
        unsigned        clockTimeStampNSec;     /* Unsigned ns timestamps */
        unsigned        receiveTimeStampNSec;   /* Unsigned ns timestamps */
        int             dummy[8];
};

I assume the second one is the current one?

Not very useful on multi-lib (32 and 64-bit) hosts as int and unsigned
can be different sizes.

I'd also like to see use of some standard like timespec_t for the sec
and fractions.  Sadly this would be incompatible with current usage, so
a bit of a PITA to implement...

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        g...@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpl0ozfZJLVz.pgp
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to