From 22ab0c018bc2246b0b6e447fbf6028b729de8ab3 Mon Sep 17 00:00:00 2001 From: yeom Date: Thu, 11 Nov 2010 04:02:46 +0000 Subject: [PATCH] index field of rentry is only for RCR, add guard condition to accessing index field. --- Robust/src/Runtime/mlp_runtime.c | 2 ++ 1 file changed, 2 insertions(+) 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++; -- 2.34.1