From 18060711dfaf7e2f4cc5ff3a4e86bdbdcd446fd4 Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 11 Nov 2010 01:35:46 +0000 Subject: [PATCH] have to consider an empty, ready read bin in front of you if you are inserting a write bin --- Robust/src/Runtime/oooJava/hashStructure.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Robust/src/Runtime/oooJava/hashStructure.c b/Robust/src/Runtime/oooJava/hashStructure.c index 9eb89720..37909403 100644 --- a/Robust/src/Runtime/oooJava/hashStructure.c +++ b/Robust/src/Runtime/oooJava/hashStructure.c @@ -162,7 +162,7 @@ inline int rcr_BWRITEBINCASE(HashStructure *T, int key, SESEcommon *task, struct if (bintail->status==READY&&bintail->total==0) { //we may have to set write as ready - while(val->total==0) { + while(1) { if (val==((BinItem_rcr *)b)) { b->item.status=READY; be->head=val; @@ -172,7 +172,10 @@ inline int rcr_BWRITEBINCASE(HashStructure *T, int key, SESEcommon *task, struct enqueuerecord(rcrrec, key, (BinItem_rcr *) b); return READY; } + } else if (val->total!=0) { + break; } + //TODO: WHEN WE DO POOLALLOC, WE LEAK NODES HERE AND ACCESS THEM W/O LOCKING BIN... val=val->next; } } -- 2.34.1