diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-27 22:10:40 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-27 22:10:40 -0400 |
commit | 13519fc5b89dedb5707ab820c513428b368e1ec1 (patch) | |
tree | e9e3575c6e1a4a57859c085edf7e2ee2b1bc113a /libgps_shm.c | |
parent | 7800222b3ddb462a6ab92f0f1950abf78eabf10b (diff) | |
download | gpsd-13519fc5b89dedb5707ab820c513428b368e1ec1.tar.gz |
Get back to a state where the shm export works.
Diffstat (limited to 'libgps_shm.c')
-rw-r--r-- | libgps_shm.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libgps_shm.c b/libgps_shm.c index 065fd6f0..c14ef4ea 100644 --- a/libgps_shm.c +++ b/libgps_shm.c @@ -51,14 +51,6 @@ int gps_shm_open(/*@out@*/struct gps_data_t *gpsdata) return 0; } -bool gps_shm_waiting(const struct gps_data_t *gpsdata UNUSED, - int timeout UNUSED) -/* is there input waiting from the GPS? */ -{ - /* someday, actually check a timestamp */ - return true; -} - int gps_shm_read(struct gps_data_t *gpsdata) /* read an update from the shared-memory segment */ { @@ -117,23 +109,6 @@ void gps_shm_close(struct gps_data_t *gpsdata) (void)shmdt((const void *)gpsdata->privdata); } - -int gps_shm_mainloop(struct gps_data_t *gpsdata, int timeout, - int (*hook)(struct gps_data_t *gpsdata, bool fix)) -/* run a shm main loop with a specified handler */ -{ - for (;;) { - if (!gps_shm_waiting(gpsdata, timeout)) { - if ((*hook)(gpsdata, false) != 0) - break; - } else { - if (gps_shm_read(gpsdata) == -1 && (*hook)(gpsdata, true) != 0) - break; - } - } - return 0; -} - #endif /* SHM_EXPORT_ENABLE */ /* end */ |