From 381883c7653690ae6ebff8bba32f6a8d06e4f19d Mon Sep 17 00:00:00 2001 From: yeom Date: Tue, 19 Jan 2010 22:50:12 +0000 Subject: [PATCH] changes. --- Robust/src/IR/Flat/BuildCode.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index b76043ff..4807be89 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -3682,13 +3682,19 @@ public class BuildCode { output.println(" for(idx = 0 ; idx < ___params___->common.parent->numRelatedWaitingQueue ; idx++){"); output.println(" if(!isEmpty(___params___->common.parent->allocSiteArray[idx].waitingQueue)){"); output.println(" struct QueueItem* qItem=getHead(___params___->common.parent->allocSiteArray[idx].waitingQueue);"); + output.println(" int removed=0;"); output.println(" while(qItem!=NULL){"); output.println(" WaitingElement* item=qItem->objectptr;"); output.println(" SESEcommon* seseItem=(SESEcommon*)item->seseRec;"); output.println(" if(seseItem->classID==___params___->common.classID && item->id==___params___->common.waitingQueueItemID){"); output.println(" removeItem(___params___->common.parent->allocSiteArray[idx].waitingQueue,qItem);"); + output.println(" removed=1;"); + output.println(" qItem=getNextQueueItem(qItem);"); + output.println(" }else if(removed){"); + output.println(" qItem=NULL;"); + output.println(" }else{"); + output.println(" qItem=getNextQueueItem(qItem);"); output.println(" }"); - output.println(" qItem=getNextQueueItem(qItem);"); output.println(" }"); output.println(" if( !isEmpty(___params___->common.parent->allocSiteArray[idx].waitingQueue) ){"); -- 2.34.1