diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-28 10:39:49 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-28 10:39:49 -0400 |
commit | 36a20c1a27af1aa64791a2528c371d39ba33939f (patch) | |
tree | 61a7f16ccad15003b19b134cadacf9e55b20844f /gpsd.h-tail | |
parent | d87282aabf65b3def0fb2d2004f03a207bbbeb5b (diff) | |
download | gpsd-36a20c1a27af1aa64791a2528c371d39ba33939f.tar.gz |
Improve the barrier code and beat GCC harder about not reordering operations.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r-- | gpsd.h-tail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail index 62a367f7..73c5834e 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -774,11 +774,11 @@ void cfmakeraw(struct termios *); /* memory barriers */ static /*@unused@*/ inline void barrier(void) { -#ifdef __GNUC__ +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) #ifndef S_SPLINT_S asm volatile("sfence"); #endif /* S_SPLINT_S */ -#endif /* __GNUC__ */ +#endif /* defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) */ } #endif /* _GPSD_H_ */ |