summaryrefslogtreecommitdiff
path: root/gpsd.h-tail
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-25 15:01:49 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-25 15:01:49 -0400
commita2c2a595f2588a53b7c804e688f459e8a1c5efaf (patch)
tree687479fc101d84a38a52736bcc3e8ba3df3c4752 /gpsd.h-tail
parent398195bc3ec704e1deb6281418bb5ed97ef7c0fe (diff)
downloadgpsd-a2c2a595f2588a53b7c804e688f459e8a1c5efaf.tar.gz
First cut at shared-memory export. Daemon-side only.
Not configured in by default yet because it produces a strange regression failure.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r--gpsd.h-tail17
1 files changed, 17 insertions, 0 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail
index 026bc617..f8f46b19 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -207,6 +207,11 @@ struct gps_context_t {
bool shmTimePPS;
# endif /* PPS_ENABLE */
#endif /* NTPSHM_ENABLE */
+#ifdef SHM_EXPORT_ENABLE
+ /* we don't want the compiler to treat writes to shmexport as dead code,
+ * and we don't want them reordered either */
+ /*@reldef@*/volatile char *shmexport;
+#endif
};
struct aivdm_context_t {
@@ -705,6 +710,18 @@ extern void ecef_to_wgs84fix(/*@out@*/struct gps_fix_t *,
double, double, double);
extern void clear_dop(/*@out@*/struct dop_t *);
+/* shmexport.c */
+#define GPSD_KEY 0x47505344 /* "GPSD" */
+struct shmexport_t
+{
+ int bookend1;
+ struct gps_data_t gpsdata;
+ int bookend2;
+};
+extern bool shm_acquire(struct gps_context_t *);
+extern void shm_release(struct gps_context_t *);
+extern void shm_update(struct gps_context_t *, struct gps_data_t *);
+
/* srecord.c */
extern void hexdump(size_t, unsigned char *, unsigned char *);
extern unsigned char sr_sum(unsigned int, unsigned int, unsigned char *);