diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-10-17 07:27:57 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-17 07:27:57 -0400 |
commit | fd48fee4c78f49bab10edb1fd10299296cf2e48a (patch) | |
tree | d43ffa61610f0d3bd47a7a52b1f075760e0b5d8f | |
parent | 838f38f224c4a6601b25ce62ceb5c3b7c25d3201 (diff) | |
download | gpsd-fd48fee4c78f49bab10edb1fd10299296cf2e48a.tar.gz |
A volatile that might be helpful, and explanatory comments.
-rw-r--r-- | ntpshm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -7,7 +7,7 @@ * two PPS delivery methods in play. One, kernel PPS (KPPS), is a Linux-only * feature supplied through special /dev/pps devices. The other, serial PPS, * uses the TIOCMIWAIT ioctl to explicitly watch for PPS on serial lines. KPPS - * requires roor permissions; serial PPS does not. + * requires root permissions; serial PPS does not. * * This file is Copyright (c) 2010 by the GPSD project * BSD terms apply: see the file COPYING in the distribution root for details. @@ -39,7 +39,7 @@ #if defined(HAVE_SYS_TIMEPPS_H) static pthread_mutex_t initialization_mutex; -static int uninitialized_pps_thread_count; +static volatile int uninitialized_pps_thread_count; #endif /* defined(HAVE_SYS_TIMEPPS_H) */ #define PPS_MAX_OFFSET 100000 /* microseconds the PPS can 'pull' */ @@ -86,7 +86,7 @@ struct shmTime * for synchronisation. * * As gpsd can be started as both root and non-root, this behaviour is - * mimiced by: + * mimicked by: * * Started as root: do as ntpd when attaching (creating) the segments. * (In contrast to ntpd, which only attaches (creates) configured @@ -103,7 +103,9 @@ struct shmTime * will be delivered on segments 2 and 3. * * to debug, try looking at the live segments this way + * * ipcs -m + * * results should look like this: * ------ Shared Memory Segments -------- * key shmid owner perms bytes nattch status |