output.println(" stallrecord->common.unresolvedDependencies=10000;");
output.println(" stallrecord->common.rcrstatus=1;");
output.println(" stallrecord->common.offsetToParamRecords=(INTPTR) & (((SESEstall *)0)->rcrRecords);");
- output.println(" stallrecord->common.refCount = 3;");
+ output.println(" stallrecord->common.refCount = 10003;");
+ output.println(" int refCount=10000;");
output.println(" int localCount=10000;");
output.println(" stallrecord->rcrRecords[0].index=0;");
output.println(" stallrecord->rcrRecords[0].flag=0;");
output.println(" if(ADDRENTRY(runningSESE->memoryQueueArray["
+ waitingElement.getQueueID() + "],rentry)==NOTREADY) {");
output.println(" localCount--;");
+ output.println(" refCount--;");
output.println(" }");
output.println("#if defined(RCR)&&!defined(OOO_DISABLE_TASKMEMPOOL)");
output.println(" else poolfreeinto(runningSESE->memoryQueueArray["+waitingElement.getQueueID()+"]->rentrypool, rentry);");
output.println(" }");
//release our reference to stall record
output.println("#ifndef OOO_DISABLE_TASKMEMPOOL");
- output.println(" RELEASE_REFERENCE_TO((SESEcommon *)stallrecord);");
+ output.println(" RELEASE_REFERENCES_TO((SESEcommon *)stallrecord, refCount);");
output.println("#endif");
output.println(" }");//exit block
}
if( state.RCR ) {
// if we're using RCR, ref count is 3 because the traverser has
// a reference, too
- output.println(" seseToIssue->common.refCount = 3;");
+ output.println(" seseToIssue->common.refCount = 10003;");
+ output.println(" int refCount=10000;");
} else {
output.println(" seseToIssue->common.refCount = 2;");
}
output.println(" rentry->queue=runningSESE->memoryQueueArray[" + waitingElement.getQueueID()+"];");
output.println(" if(ADDRENTRY(runningSESE->memoryQueueArray["+ waitingElement.getQueueID()+ "],rentry)==READY) {");
+ output.println(" refCount--;");
for(int j=0;mask!=0;j++) {
if ((mask&1)==1)
output.println(" dispCount"+j+"++;");
output.println(" if(!dispCount"+i+" || !atomic_sub_and_test(dispCount"+i+",&(seseToIssue->rcrRecords["+i+"].flag)))");
output.println(" localCount++;");
}
+
+ output.println("#ifndef OOO_DISABLE_TASKMEMPOOL");
+ output.println(" RELEASE_REFERENCES_TO((SESEcommon *)seseToIssue, refCount);");
+ output.println("#endif");
+
+
output.println(" }");
}
}