}
/********* Output method declaration ***********/
-
+ if (state.DSM||state.SINGLETM) {
+ headersout.println("#define D"+cn.getSafeSymbol()+lb.getSignature()+md.getSafeSymbol()+"_"+md.getSafeMethodDescriptor()+" 1");
+ } else {
+ headersout.println("#define D"+cn.getSafeSymbol()+md.getSafeSymbol()+"_"+md.getSafeMethodDescriptor()+" 1");
+ }
/* First the return type */
if (md.getReturnType()!=null) {
if (md.getReturnType().isClass()||md.getReturnType().isArray())
/* Next the method name */
if (state.DSM||state.SINGLETM) {
headersout.print(cn.getSafeSymbol()+lb.getSignature()+md.getSafeSymbol()+"_"+md.getSafeMethodDescriptor()+"(");
- } else
+ } else {
headersout.print(cn.getSafeSymbol()+md.getSafeSymbol()+"_"+md.getSafeMethodDescriptor()+"(");
-
+ }
boolean printcomma=false;
if (GENERATEPRECISEGC) {
if (state.DSM||state.SINGLETM) {
if (state.DSM&&lb.isAtomic())
output.println("if (needtocollect) checkcollect2(&"+localsprefix+");");
else
- output.println("if (needtocollect) checkcollect(&"+localsprefix+");");
+ output.println("if (needtocollect) checkcollect(&"+localsprefix+");");
}
generateCode( fm.getNext(0), fm, lb, null, output );
if(state.DSM&&locality.getAtomic(lb).get(fn).intValue()>0) {
output.println("if (needtocollect) checkcollect2(&"+localsprefix+");");
} else
- output.println("if (needtocollect) checkcollect(&"+localsprefix+");");
+ output.println("if (needtocollect) checkcollect(&"+localsprefix+");");
} else
output.println("/* nop */");
return;
* ================================================================
*/
int transCommit() {
-#ifdef TRANSSTATS
int softaborted=0;
-#endif
do {
/* Look through all the objects in the transaction hash table */
int finalResponse;
if(finalResponse == TRANS_SOFT_ABORT) {
#ifdef TRANSSTATS
nSoftAbort++;
- softaborted++;
#endif
+ softaborted++;
if (softaborted>4) {
//retry if to many soft aborts
freenewobjs();
/* Decide the final response */
if (softabort) {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
- DEBUGSTM("Softabort\n");
+ DEBUGSTM("Soft Abort: rd: %u wr: %u tot: %u\n", numoidrdlocked, numoidwrlocked, c_numelements);
return TRANS_SOFT_ABORT;
} else {
transCommitProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
- DEBUGSTM("Commit\n");
+ DEBUGSTM("Commit: rd: %u wr: %u tot: %u\n", numoidrdlocked, numoidwrlocked, c_numelements);
return TRANS_COMMIT;
}
}
/* Decide the final response */
if (softabort) {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
- DEBUGSTM("Softabort\n");
+ DEBUGSTM("Soft Abort: rd: %u wr: %u tot: %u\n", numoidrdlocked, numoidwrlocked, c_numelements);
return TRANS_SOFT_ABORT;
} else {
transCommitProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
- DEBUGSTM("Commit\n");
+ DEBUGSTM("Commit: rd: %u wr: %u tot: %u\n", numoidrdlocked, numoidwrlocked, c_numelements);
return TRANS_COMMIT;
}
}
exit(___status___);
}
+#ifdef D___Vector______removeElement_____AR_L___Object____I
void CALL12(___Vector______removeElement_____AR_L___Object____I, int ___index___, struct ArrayObject * ___array___, int ___index___) {
int length=VAR(___array___)->___length___;
char* offset=((char *)(&VAR(___array___)->___length___))+sizeof(unsigned int)+sizeof(void *)*___index___;
memmove(offset, offset+sizeof(void *),(length-___index___-1)*sizeof(void *));
}
-
+#endif
void CALL11(___System______printI____I,int ___status___, int ___status___) {
printf("%d\n",___status___);