From: bdemsky Date: Thu, 2 Nov 2006 08:02:22 +0000 (+0000) Subject: small changes...delete unused code X-Git-Tag: preEdgeChange~779 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=beca8ea3948cd311c8463d3317e45a530c1d9ce0;p=IRC.git small changes...delete unused code --- diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c index 1ad9651b..d0571b9b 100644 --- a/Robust/src/Runtime/runtime.c +++ b/Robust/src/Runtime/runtime.c @@ -233,7 +233,9 @@ void flagorand(void * ptr, int ormask, int andmask) { } } -/* Handler for signals */ +/* Handler for signals. The signals catch null pointer errors and + arithmatic errors. */ + void myhandler(int sig, struct __siginfo *info, void *uap) { #ifdef DEBUG printf("sig=%d\n",sig); @@ -242,7 +244,6 @@ void myhandler(int sig, struct __siginfo *info, void *uap) { longjmp(error_handler,1); } - fd_set readfds; int maxreadfd; struct RuntimeHash *fdtoobject; @@ -321,6 +322,7 @@ void executetasks() { newtask: while(!isEmpty(activetasks)||(maxreadfd>0)) { + /* Check if any filedescriptors have IO pending */ if (maxreadfd>0) { int i; struct timeval timeout={0,0}; @@ -343,12 +345,14 @@ void executetasks() { } } + /* See if there are any active tasks */ if (!isEmpty(activetasks)) { int i; struct QueueItem * qi=(struct QueueItem *) getTail(activetasks); struct taskparamdescriptor *tpd=(struct taskparamdescriptor *) qi->objectptr; removeItem(activetasks, qi); + /* Make sure that the parameters are still in the queues */ for(i=0;itask->numParameters;i++) { void * parameter=tpd->parameterArray[i]; struct parameterdescriptor * pd=tpd->task->descriptorarray[i]; @@ -358,6 +362,7 @@ void executetasks() { taskpointerarray[i]=parameter; } { + /* Checkpoint the state */ struct RuntimeHash * forward=allocateRuntimeHash(100); struct RuntimeHash * reverse=allocateRuntimeHash(100); void ** checkpoint=makecheckpoint(tpd->task->numParameters, taskpointerarray, forward, reverse); @@ -406,6 +411,9 @@ void executetasks() { } } +/* This function processes the task information to create queues for + each parameter type. */ + void processtasks() { int i; for(i=0;i