summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ppsthread.c b/ppsthread.c
index ee05d3a1..c6a7e99d 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -328,11 +328,9 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
session->gpsdata.dev.path, errno, strerror(errno));
break;
}
- /* start of time critical section */
- gpsd_report(&session->context->errout, LOG_PROG,
- "PPS ioctl(TIOCMIWAIT) on %s succeeded\n",
- session->gpsdata.dev.path);
- /* quick, grab a copy of last_fixtime before it changes */
+ /* start of time critical section
+ * only error reporting, not success reporting in critical section
+ * quick, grab a copy of last_fixtime before it changes */
last_fixtime_real = session->last_fixtime.real;
last_fixtime_clock = session->last_fixtime.clock;
@@ -369,6 +367,9 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
}
/*@ -ignoresigns */
/* end of time critical section */
+ gpsd_report(&session->context->errout, LOG_PROG,
+ "PPS ioctl(TIOCMIWAIT) on %s succeeded\n",
+ session->gpsdata.dev.path);
/*
* If there was no valid time from the GPS when the PPS event was