From: Harlan Stenn Date: Fri, 14 Sep 2012 22:45:55 +0000 (-0400) Subject: Updates to driver28.html X-Git-Tag: NTP_4_2_7P305~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7ecd545345586571afe1a221f32c709c5259f94;p=thirdparty%2Fntp.git Updates to driver28.html bk: 5053b3a3mlCJX7LeHx3-VGDIB1dUZQ --- diff --git a/ChangeLog b/ChangeLog index 438cadcbe..5dbab3a3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * [Bug 2263] broadcast server doesn't work for host with OS_MISSES_SPECIFIC_ROUTE_UPDATES. * [Bug 2271] Decode refclock types when built with --disable-all-clocks. +* Updates to driver28.html. (4.2.7p304) 2012/09/06 Released by Harlan Stenn * [Bug 2264] Cleanup SEL240X Refclock. * In refclock_wwv.c rename SECOND to WWV_SEC and MINUTE to WWV_MIN. diff --git a/html/drivers/driver28.html b/html/drivers/driver28.html index 6ebb39f91..3e984238f 100644 --- a/html/drivers/driver28.html +++ b/html/drivers/driver28.html @@ -22,35 +22,36 @@

Structure of shared memory-segment

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
-                */
-  int    count;
-  time_t clockTimeStampSec;      /* external clock */
-  int    clockTimeStampUSec;     /* external clock */
-  time_t receiveTimeStampSec;    /* internal clock, when external value was received */
-  int    receiveTimeStampUSec;   /* internal clock, when external value was received */
-  int    leap;
-  int    precision;
-  int    nsamples;
-  int    valid;
-  int    dummy[10]; 
+        int    mode; /* 0 - if valid is set:
+                      *       use values,
+                      *       clear valid
+                      * 1 - if valid is set:
+                      *       if count before and after read of data 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];
 };

Operation mode=0

-

Each second, the valid-flag of the shared memory-segment is checked:

-

If set, the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are passed to ntp, and the valid-flag is cleared and a counter is bumped.

-

If not set, a counter is bumped

+

Each second, the value of valid of the shared memory-segment is checked:

+

If set, the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are passed to ntp, and valid is cleared and count is bumped.

+

If not set, count is bumped.

Operation mode=1

-

Each second, the valid-flag of the shared memory-segment is checked:

-

If set, the count-field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered count is compared to the count now in the record. If both are equal, the values read from the record are passed to ntp. If they differ, another process has modified the record while it was read out (was not able to produce this case), and failure is reported to ntp. The valid flag is cleared and a counter is bumped.

-

If not set, a counter is bumped

+

Each second, valid in the shared memory-segment is checked:

+

If set, the count field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered count is compared to current value of count now in the record. If both are equal, the values read from the record are passed to ntp. If they differ, another process has modified the record while it was read out (was not able to produce this case), and failure is reported to ntp. The valid flag is cleared and count is bumped.

+

If not set, count is bumped

gpsd