From: yeom Date: Thu, 11 Nov 2010 04:02:46 +0000 (+0000) Subject: index field of rentry is only for RCR, add guard condition to accessing index field. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=22ab0c018bc2246b0b6e447fbf6028b729de8ab3;p=IRC.git index field of rentry is only for RCR, add guard condition to accessing index field. --- diff --git a/Robust/src/Runtime/mlp_runtime.c b/Robust/src/Runtime/mlp_runtime.c index 542dad31..7bc8c579 100644 --- a/Robust/src/Runtime/mlp_runtime.c +++ b/Robust/src/Runtime/mlp_runtime.c @@ -534,7 +534,9 @@ int ADDVECTOR(MemoryQueue *Q, REntry *r) { //expose entry int index=V->index; V->array[index]=r; +#ifdef RCR r->index=index; +#endif //*****NEED memory barrier here to ensure compiler does not reorder writes to V.array and V.index BARRIER(); V->index++;