diff options
Diffstat (limited to 'ppsthread.c')
-rw-r--r-- | ppsthread.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ppsthread.c b/ppsthread.c index ff25b81c..52512bc8 100644 --- a/ppsthread.c +++ b/ppsthread.c @@ -350,8 +350,8 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) "PPS: pthread_mutex_lock() : %s\n", errbuf); } /*@ +unrecog @*/ - last_fixtime_real = session->pps_thread.fixin_real; - last_fixtime_clock = session->pps_thread.fixin_clock; + last_fixtime_real = session->last_fixtime.real; + last_fixtime_clock = session->last_fixtime.clock; /*@ -unrecog (splint has no pthread declarations as yet) @*/ pthread_err = pthread_mutex_unlock(&ppslast_mutex); if ( 0 != pthread_err ) { @@ -704,9 +704,9 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) } /*@ +unrecog @*/ /*@-type@*/ /* splint is confused about struct timespec */ - session->pps_thread.ppsout_last = ppstimes; + session->pps_state.ppslast = ppstimes; /*@+type@*/ - session->pps_thread.ppsout_count++; + session->pps_state.ppscount++; /*@ -unrecog (splint has no pthread declarations as yet) @*/ pthread_err = pthread_mutex_unlock(&ppslast_mutex); if ( 0 != pthread_err ) { @@ -787,7 +787,7 @@ void pps_thread_deactivate(struct gps_device_t *session) /*@+nullstate +mustfreeonly@*/ } -int pps_thread_stash_fixtime(volatile struct pps_thread_t *pps_thread, +int pps_thread_stash_fixtime(volatile struct pps_fixtime_t *last_fixtime, timestamp_t realtime, struct timespec clocktime) /* thread-safe update of last fix time - only way we pass data in */ { @@ -799,8 +799,8 @@ int pps_thread_stash_fixtime(volatile struct pps_thread_t *pps_thread, ret = PPS_LOCK_ERR; else { /*@ +unrecog @*/ - pps_thread->fixin_real = realtime; - pps_thread->fixin_clock = clocktime; + last_fixtime->real = realtime; + last_fixtime->clock = clocktime; } /*@ -unrecog (splint has no pthread declarations as yet) @*/ pthread_err = pthread_mutex_unlock(&ppslast_mutex); @@ -811,8 +811,7 @@ int pps_thread_stash_fixtime(volatile struct pps_thread_t *pps_thread, return ret; } -int pps_thread_lastpps(volatile struct pps_thread_t *pps_thread, - struct timedelta_t *td) +int pps_thread_lastpps(struct pps_state_t *pps_state, struct timedelta_t *td) /* return the delta at the time of the last PPS - only way we pass data out */ { volatile int ret; @@ -825,8 +824,8 @@ int pps_thread_lastpps(volatile struct pps_thread_t *pps_thread, ret = PPS_LOCK_ERR; else { /*@ +unrecog @*/ - *td = pps_thread->ppsout_last; - ret = pps_thread->ppsout_count; + *td = pps_state->ppslast; + ret = pps_state->ppscount; } /*@ -unrecog (splint has no pthread declarations as yet) @*/ pthread_err = pthread_mutex_unlock(&ppslast_mutex); |