From: bdemsky Date: Sat, 2 Apr 2011 22:49:40 +0000 (+0000) Subject: new information...x86 allows reads to be reordered with earlier writes to different... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ffd763d97c2462ddc8c67f1b5712e0ad73725a14;p=IRC.git new information...x86 allows reads to be reordered with earlier writes to different locations.... add mbarrier for situations where we can't allow this to happen... --- diff --git a/Robust/src/Runtime/mlp_lock.h b/Robust/src/Runtime/mlp_lock.h index 46d8a930..57bd18ad 100644 --- a/Robust/src/Runtime/mlp_lock.h +++ b/Robust/src/Runtime/mlp_lock.h @@ -11,6 +11,7 @@ #define __xg(x) ((volatile INTPTR *)(x)) #define CFENCE asm volatile("":::"memory"); +#define MFENCE asm volatile("mfence":::"memory"); #define LOCK_PREFIX \ ".section .smp_locks,\"a\"\n" \ @@ -117,5 +118,10 @@ static inline int BARRIER(){ return 1; } +static inline int MBARRIER(){ + MFENCE; + return 1; +} + #endif // ____MLP_LOCK_H__