summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-04-01 02:41:02 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-04-01 02:41:02 -0400
commit90e1d453f282f014a959260764431e64a791942d (patch)
treedd3137c312202089a8ee5df5a37a78e848397bfd /ppsthread.c
parentca3731143371a2b064f42b97c370ef54bfacb654 (diff)
downloadgpsd-90e1d453f282f014a959260764431e64a791942d.tar.gz
Thread monitor interface simplification.
With a bit of refactoring we can eliminate one of the hooks. PPS observed live, telnetting to localhost:2947 with gpsd running.
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ppsthread.c b/ppsthread.c
index 1f770074..1b9aba03 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -758,8 +758,7 @@ static void *gpsd_ppsmonitor(void *arg)
* a few more sanity checks
* call the report hook with our PPS report
*/
- while (thread_context->report_hook != NULL
- || thread_context->pps_hook != NULL) {
+ while (thread_context->report_hook != NULL) {
bool ok = false;
char *log = NULL;
char *edge_str = "";
@@ -1149,8 +1148,6 @@ static void *gpsd_ppsmonitor(void *arg)
log1 = thread_context->report_hook(thread_context, &ppstimes);
else
log1 = "no report hook";
- if (thread_context->pps_hook != NULL)
- thread_context->pps_hook(thread_context, &ppstimes);
thread_lock(thread_context);
thread_context->ppsout_last = ppstimes;
thread_context->ppsout_count++;
@@ -1233,7 +1230,6 @@ void pps_thread_deactivate(volatile struct pps_thread_t *pps_thread)
/* cleanly terminate PPS thread */
{
pps_thread->report_hook = NULL;
- pps_thread->pps_hook = NULL;
}
void pps_thread_fixin(volatile struct pps_thread_t *pps_thread,