From: bdemsky Date: Wed, 24 Jun 2009 07:14:51 +0000 (+0000) Subject: more bug fixes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2463ee7a78b9b323de8cb07f290b4c42580aff70;p=IRC.git more bug fixes --- diff --git a/Robust/src/Runtime/STM/stm.c b/Robust/src/Runtime/STM/stm.c index 8e256116..b1ceadbf 100644 --- a/Robust/src/Runtime/STM/stm.c +++ b/Robust/src/Runtime/STM/stm.c @@ -551,7 +551,7 @@ int traverseCache() { } while(node != NULL); //have to abort to avoid deadlock - transAbortProcess(oidwrlocked, numoidwrlocked); + transAbortProcess(oidwrlocked, numoidwrtotal); #ifdef STMSTATS ABORTCOUNT(header); (typesCausingAbort[TYPE(header)])++; @@ -582,7 +582,11 @@ int traverseCache() { if(header->lock>0) { //not write locked if(version != header->version) { /* versions do not match */ oidrdlocked[numoidrdlocked++] = header; +#ifdef DELAYCOMP + transAbortProcess(oidwrlocked, numoidwrtotal); +#else transAbortProcess(oidwrlocked, numoidwrlocked); +#endif #ifdef STMSTATS ABORTCOUNT(header); (typesCausingAbort[TYPE(header)])++; @@ -598,7 +602,11 @@ int traverseCache() { if(version == header->version) { softabort=1; } +#ifdef DELAYCOMP + transAbortProcess(oidwrlocked, numoidwrtotal); +#else transAbortProcess(oidwrlocked, numoidwrlocked); +#endif #ifdef STMSTATS ABORTCOUNT(header); (typesCausingAbort[TYPE(header)])++; @@ -759,7 +767,7 @@ int alttraverseCache() { } while(node != NULL); //have to abort to avoid deadlock - transAbortProcess(oidwrlocked, numoidwrlocked); + transAbortProcess(oidwrlocked, numoidwrtotal); #ifdef STMSTATS ABORTCOUNT(header); (typesCausingAbort[TYPE(header)])++; @@ -788,7 +796,11 @@ int alttraverseCache() { unsigned int version=oidrdversion[i]; if(header->lock>=0) { if(version != header->version) { +#ifdef DELAYCOMP + transAbortProcess(oidwrlocked, numoidwrtotal); +#else transAbortProcess(oidwrlocked, numoidwrlocked); +#endif #ifdef STMSTATS ABORTCOUNT(header); (typesCausingAbort[TYPE(header)])++; @@ -803,7 +815,11 @@ int alttraverseCache() { if(version == header->version) { softabort=1; } +#ifdef DELAYCOMP + transAbortProcess(oidwrlocked, numoidwrtotal); +#else transAbortProcess(oidwrlocked, numoidwrlocked); +#endif #ifdef STMSTATS ABORTCOUNT(header); (typesCausingAbort[TYPE(header)])++;