outmethodheader.println("#include \"structdefs.h\"");
if (state.DSM)
outmethodheader.println("#include \"dstm.h\"");
+ if (state.ABORTREADERS)
+ outmethodheader.println("#include \"abortreaders.h\"");
/* Output Structures */
outputStructs(outstructs);
TempDescriptor tmp=tmpit.next();
output.println(generateTemp(fm, backuptable.get(tmp),lb)+"="+generateTemp(fm,tmp,lb)+";");
}
+
output.println("goto transstart"+faen.getIdentifier()+";");
/******* Print code to retry aborted transaction *******/
output.println("transstart"+faen.getIdentifier()+":");
output.println("trans=transStart();");
+
+ if (state.ABORTREADERS) {
+ output.println("if (setjmp(trans->aborttrans))");
+ output.println(" goto transretry"+faen.getIdentifier()+":");
+ }
}
public void generateFlatAtomicExitNode(FlatMethod fm, LocalityBinding lb, FlatAtomicExitNode faen, PrintWriter output) {
public static boolean PRINTFLAT=false;
public static boolean PRINTSCHEDULING=false;
public static boolean PRINTSCHEDULESIM=false;
+ public static boolean ABORTREADERS=false;
public int CORENUM = 1;
public String structfile;
public String main;
if (td!=null)
if (!typeutil.isSuperorType(td,ln.getType()))
- throw new Error("Field node returns "+ln.getType()+", but need "+td);
+ throw new Error("Field node returns "+ln.getType()+", but need "+td+" in "+md);
}
void checkNameNode(Descriptor md, SymbolTable nametable, NameNode nn, TypeDescriptor td) {
state.CONSCHECK=true;
else if (option.equals("-task"))
state.TASK=true;
+ else if (option.equals("-abortreaders"))
+ state.ABORTREADERS=true;
else if (option.equals("-taskstate"))
state.TASKSTATE=true;
else if (option.equals("-tagstate"))
System.out.println("-struct structfile -- output structure declarations for repair tool");
System.out.println("-mainclass -- main function to call");
System.out.println("-dsm -- distributed shared memory support");
+ System.out.println("-abortreaders -- abort readers");
System.out.println("-precise -- use precise garbage collection");
System.out.println("-conscheck -- turn on consistency checking");
System.out.println("-task -- compiler for tasks");
printhelp() {
echo -robustroot set up the ROBUSTROOT to directory other than default one
echo -dsm distributed shared memory
+echo -abortreaders abort readers immediately
echo -trueprob double - probabiltiy of true branch
echo -dsmcaching -enable caching in dsm runtime
echo -mac distributed shared memory mac support
elif [[ $1 = '-justanalyze' ]]
then
EXITAFTERANALYSIS=true
+elif [[ $1 = '-abortreaders' ]]
+then
+EXTRAOPTIONS="$EXTRAOPTIONS -DABORTREADERS"
+JAVAOPTS="$JAVAOPTS -abortreaders"
elif [[ $1 = '-robustroot' ]]
then
ROBUSTROOT="$2"
if ! $NOJAVA
then
if ! ${ROBUSTROOT}/ourjava -Xms50m -Xmx600m $JAVAFORWARDOPTS -classpath $ROBUSTROOT/../cup/:$ROBUSTROOT Main.Main -classlibrary \
-$ROBUSTROOT/ClassLibrary/ -dir $BUILDDIR -precise \
+$ROBUSTROOT/ClassLibrary/ -dir $BUILDDIR \
$JAVAOPTS $SRCFILES
then exit $?
fi