summaryrefslogtreecommitdiff
path: root/gpsd.h-tail
diff options
context:
space:
mode:
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r--gpsd.h-tail9
1 files changed, 9 insertions, 0 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail
index f0f01519..bd859e8f 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -758,6 +758,15 @@ void cfmakeraw(struct termios *);
#define DEVICEHOOKPATH SYSCONFDIR"/gpsd/device-hook"
+/* memory barriers */
+static inline void barrier(void) {
+#ifdef __GNUC__
+#ifndef S_SPLINT_S
+ asm volatile("sfence");
+#endif /* S_SPLINT_S */
+#endif /* __GNUC__ */
+}
+
#endif /* _GPSD_H_ */
// Local variables:
// mode: c