summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ev.c b/ev.c
index 2fef11c..a818418 100644
--- a/ev.c
+++ b/ev.c
@@ -629,7 +629,9 @@ struct signalfd_siginfo
#elif defined __s390__ || defined __s390x__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory")
#elif defined __mips__
- #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory")
+ /* GNU/Linux emulates sync on mips1 architectures, so we force it's use */
+ /* anybody else who still uses mips1 is supposed to send in their version, with detection code. */
+ #define ECB_MEMORY_FENCE __asm__ __volatile__ (".set mips2; sync; .set mips0" : : : "memory")
#elif defined __alpha__
#define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory")
#elif defined __hppa__