changeset 9:832bc715fbf2 dev_expl_VP_and_DKU

Some bug fixes.. not compiling yet
author Sean Halle <seanhalle@yahoo.com>
date Mon, 06 Aug 2012 01:14:41 -0700
parents eb3d77ca9f59
children b13fbd445e0a ed268fc7376a
files VSs.c VSs.h VSs_PluginFns.c VSs_Request_Handlers.c VSs_Request_Handlers.h
diffstat 5 files changed, 23 insertions(+), 11 deletions(-) [+]
line diff
     1.1 --- a/VSs.c	Thu Aug 02 01:03:14 2012 -0700
     1.2 +++ b/VSs.c	Mon Aug 06 01:14:41 2012 -0700
     1.3 @@ -213,19 +213,21 @@
     1.4        for( slotNum = 0; slotNum < NUM_ANIM_SLOTS; ++slotNum )
     1.5         { idleSlv = VMS_int__create_slaveVP(&idle_fn,NULL);
     1.6           idleSlv->coreAnimatedBy                = coreNum;
     1.7 -         idleSlv->animSlotAssignedTo            = slotNum;
     1.8 +         idleSlv->animSlotAssignedTo            =
     1.9 +                               _VMSMasterEnv->allAnimSlots[coreNum][slotNum];
    1.10           semanticEnv->idleSlv[coreNum][slotNum] = idleSlv;
    1.11           
    1.12           currTaskSlv = VMS_int__create_slaveVP( &idle_fn, NULL );
    1.13           currTaskSlv->coreAnimatedBy                 = coreNum;
    1.14 -         currTaskSlv->animSlotAssignedTo             = slotNum;
    1.15 +         currTaskSlv->animSlotAssignedTo             = 
    1.16 +                               _VMSMasterEnv->allAnimSlots[coreNum][slotNum];
    1.17           semanticEnv->currTaskSlvs[coreNum][slotNum] = currTaskSlv;
    1.18         }
    1.19      }
    1.20  
    1.21        //create the ready queues, hash tables used for matching and so forth
    1.22     semanticEnv->slavesReadyToResumeQ = makeVMSQ();
    1.23 -   semanticEnv->extraTaskSlvQ        = makeVMSQ();
    1.24 +   semanticEnv->freeExtraTaskSlvQ    = makeVMSQ();
    1.25     semanticEnv->taskReadyQ           = makeVMSQ();
    1.26     
    1.27     semanticEnv->argPtrHashTbl  = makeHashTable32( 16, &VMS_int__free );
     2.1 --- a/VSs.h	Thu Aug 02 01:03:14 2012 -0700
     2.2 +++ b/VSs.h	Mon Aug 06 01:14:41 2012 -0700
     2.3 @@ -182,9 +182,9 @@
     2.4  
     2.5  typedef struct
     2.6   {
     2.7 -   PrivQueueStruc **slavesReadyToResumeQ; //Shared (slaves not pinned)
     2.8 -   PrivQueueStruc **freeExtraTaskSlvQ;     //Shared
     2.9 -   PrivQueueStruc  *taskReadyQ;        //Shared (tasks not pinned)
    2.10 +   PrivQueueStruc  *slavesReadyToResumeQ; //Shared (slaves not pinned)
    2.11 +   PrivQueueStruc  *freeExtraTaskSlvQ;    //Shared
    2.12 +   PrivQueueStruc  *taskReadyQ;           //Shared (tasks not pinned)
    2.13     SlaveVP         *currTaskSlvs[NUM_CORES][NUM_ANIM_SLOTS];
    2.14     HashTable       *argPtrHashTbl;
    2.15     HashTable       *commHashTbl;
    2.16 @@ -240,7 +240,7 @@
    2.17     TransListElem *lastTransEntered;
    2.18     bool32         needsTaskAssigned;
    2.19     VSsTaskStub   *taskStub;
    2.20 -   VSsSlvType     slaveType;
    2.21 +   enum VSsSlvType     slaveType;
    2.22   }
    2.23  VSsSemData;
    2.24   
    2.25 @@ -370,6 +370,8 @@
    2.26  VSs__create_slave_with_affinity( TopLevelFnPtr fnPtr,    void *initData,
    2.27                              SlaveVP *creatingSlv, int32 coreToAssignOnto);
    2.28  
    2.29 +void 
    2.30 +idle_fn(void* data, SlaveVP *animatingSlv);
    2.31  
    2.32  //=====================  Measurement of Lang Overheads  =====================
    2.33  #include "Measurement/VSs_Measurement.h"
     3.1 --- a/VSs_PluginFns.c	Thu Aug 02 01:03:14 2012 -0700
     3.2 +++ b/VSs_PluginFns.c	Mon Aug 06 01:14:41 2012 -0700
     3.3 @@ -284,7 +284,7 @@
     3.4  
     3.5     if( semData->slaveType == slotTaskSlv )
     3.6      {    //should never call dissipate on a slot assigned slave
     3.7 -      VMS__throw_exception(); 
     3.8 +      VMS_PI__throw_exception( "dissipate a slot-assigned slave", requestingSlv, NULL );
     3.9      }
    3.10  
    3.11        //if make it to here, then is a thread slave
     4.1 --- a/VSs_Request_Handlers.c	Thu Aug 02 01:03:14 2012 -0700
     4.2 +++ b/VSs_Request_Handlers.c	Mon Aug 06 01:14:41 2012 -0700
     4.3 @@ -11,6 +11,8 @@
     4.4  #include "Queue_impl/PrivateQueue.h"
     4.5  #include "Hash_impl/PrivateHash.h"
     4.6  #include "VSs.h"
     4.7 +#include "VSs_Request_Handlers.h"
     4.8 +
     4.9  
    4.10  
    4.11  
    4.12 @@ -654,7 +656,8 @@
    4.13     HashEntry   *entry;
    4.14     HashTable   *commHashTbl = semEnv->commHashTbl;
    4.15  
    4.16 -         DEBUG__printf2(dbgRqstHdlr,"SendFromTo request from processor %d to %d",semReq->senderID,semReq->receiverID)
    4.17 +         DEBUG__printf2(dbgRqstHdlr,"SendFromTo request from processor %d to %d",
    4.18 +                        semReq->senderID[1],semReq->receiverID[1])
    4.19     
    4.20     receiverID  = semReq->receiverID; //For "send", know both send & recv procrs
    4.21     senderID    = semReq->senderID;
    4.22 @@ -737,7 +740,7 @@
    4.23     HashEntry  *entry;
    4.24     HashTable  *commHashTbl = semEnv->commHashTbl;
    4.25     
    4.26 -         DEBUG__printf1(dbgRqstHdlr,"SendType request to %d",semReq->receiverID)
    4.27 +         DEBUG__printf1(dbgRqstHdlr,"SendType request to %d",semReq->receiverID[1])
    4.28   
    4.29     receiverID  = semReq->receiverID; //For "send", know both send & recv procrs
    4.30     receiverSlv = semReq->receiverSlv;
    4.31 @@ -826,7 +829,7 @@
    4.32     HashEntry   *entry;
    4.33     HashTable   *commHashTbl = semEnv->commHashTbl;
    4.34  
    4.35 -         DEBUG__printf2(dbgRqstHdlr,"SendFromTo request from %d to %d",semReq->senderID,semReq->receiverID)
    4.36 +         DEBUG__printf2(dbgRqstHdlr,"SendFromTo request from %d to %d",semReq->senderID[1],semReq->receiverID[1])
    4.37     
    4.38     receiverID  = semReq->receiverID; //For "send", know both send & recv procrs
    4.39     senderID    = semReq->senderID;
     5.1 --- a/VSs_Request_Handlers.h	Thu Aug 02 01:03:14 2012 -0700
     5.2 +++ b/VSs_Request_Handlers.h	Mon Aug 06 01:14:41 2012 -0700
     5.3 @@ -52,6 +52,11 @@
     5.4  inline void
     5.5  handleEndDataSingleton( VSsSemReq *semReq, SlaveVP *requestingSlv,
     5.6                      VSsSemEnv *semEnv );
     5.7 +inline void
     5.8 +free_task_stub( VSsTaskStub *stubToFree );
     5.9 +inline void
    5.10 +replaceWithNewSlotSlv( SlaveVP *requestingSlv, VSsSemEnv *semEnv );
    5.11 +
    5.12  
    5.13  #endif	/* _VSs_REQ_H */
    5.14