diff MasterLoop.c @ 200:6db9e4898978

VMS name chgs -- added "WL" "PI" and "int" and split vms.h up
author Me@portablequad
date Sun, 12 Feb 2012 01:49:33 -0800
parents 7cff4e13d5c4
children
line diff
     1.1 --- a/MasterLoop.c	Sat Feb 11 21:43:43 2012 -0800
     1.2 +++ b/MasterLoop.c	Sun Feb 12 01:49:33 2012 -0800
     1.3 @@ -16,7 +16,7 @@
     1.4  //===========================================================================
     1.5  void inline
     1.6  stealWorkInto( SchedSlot *currSlot, VMSQueueStruc *readyToAnimateQ,
     1.7 -               VirtProcr *masterPr );
     1.8 +               SlaveVP *masterPr );
     1.9  
    1.10  //===========================================================================
    1.11  
    1.12 @@ -71,10 +71,10 @@
    1.13   * is case when other cores starved and one core's requests generate work
    1.14   * for them -- so keep max in queue to 3 or 4..
    1.15   */
    1.16 -void masterLoop( void *initData, VirtProcr *animatingPr )
    1.17 +void masterLoop( void *initData, SlaveVP *animatingPr )
    1.18   { 
    1.19     int32           slotIdx, numSlotsFilled;
    1.20 -   VirtProcr      *schedVirtPr;
    1.21 +   SlaveVP      *schedVirtPr;
    1.22     SchedSlot      *currSlot, **schedSlots;
    1.23     MasterEnv      *masterEnv;
    1.24     VMSQueueStruc  *readyToAnimateQ;
    1.25 @@ -84,11 +84,11 @@
    1.26     void           *semanticEnv;
    1.27  
    1.28     int32           thisCoresIdx;
    1.29 -   VirtProcr      *masterPr;
    1.30 -   volatile        VirtProcr *volatileMasterPr;
    1.31 +   SlaveVP      *masterPr;
    1.32 +   volatile        SlaveVP *volatileMasterPr;
    1.33     
    1.34     volatileMasterPr = animatingPr;
    1.35 -   masterPr         = (VirtProcr*)volatileMasterPr; //used to force re-define after jmp
    1.36 +   masterPr         = (SlaveVP*)volatileMasterPr; //used to force re-define after jmp
    1.37  
    1.38        //First animation of each MasterVP will in turn animate this part
    1.39        // of setup code.. (VP creator sets up the stack as if this function
    1.40 @@ -120,7 +120,7 @@
    1.41     masterEnv        = (MasterEnv*)_VMSMasterEnv;
    1.42     
    1.43        //GCC may optimize so doesn't always re-define from frame-storage
    1.44 -   masterPr         = (VirtProcr*)volatileMasterPr;  //just to make sure after jmp
    1.45 +   masterPr         = (SlaveVP*)volatileMasterPr;  //just to make sure after jmp
    1.46     thisCoresIdx     = masterPr->coreAnimatedBy;
    1.47     readyToAnimateQ  = masterEnv->readyToAnimateQs[thisCoresIdx];
    1.48     schedSlots       = masterEnv->allSchedSlots[thisCoresIdx];
    1.49 @@ -202,9 +202,9 @@
    1.50   */
    1.51  void inline
    1.52  stealWorkInto( SchedSlot *currSlot, VMSQueueStruc *readyToAnimateQ,
    1.53 -               VirtProcr *masterPr )
    1.54 +               SlaveVP *masterPr )
    1.55   { 
    1.56 -   VirtProcr   *stolenPr;
    1.57 +   SlaveVP   *stolenPr;
    1.58     int32        coreIdx, i;
    1.59     VMSQueueStruc *currQ;
    1.60  
    1.61 @@ -306,9 +306,9 @@
    1.62  void inline
    1.63  gateProtected_stealWorkInto( SchedSlot *currSlot,
    1.64                               VMSQueueStruc *myReadyToAnimateQ,
    1.65 -                             VirtProcr *masterPr )
    1.66 +                             SlaveVP *masterPr )
    1.67   {
    1.68 -   VirtProcr     *stolenPr;
    1.69 +   SlaveVP     *stolenPr;
    1.70     int32          coreIdx, i, haveAVictim, gotLock;
    1.71     VMSQueueStruc *victimsQ;
    1.72