Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison AnimationMaster.c @ 238:b95711c6965c
counters work now
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 21 Mar 2012 11:09:11 +0100 |
| parents | d9053472d0db |
| children | 7ed97c961901 |
comparison
equal
deleted
inserted
replaced
| 5:f53c663a3b8f | 6:063efb5235fd |
|---|---|
| 128 MasterEnv *masterEnv; | 128 MasterEnv *masterEnv; |
| 129 SlaveAssigner slaveAssigner; | 129 SlaveAssigner slaveAssigner; |
| 130 RequestHandler requestHandler; | 130 RequestHandler requestHandler; |
| 131 void *semanticEnv; | 131 void *semanticEnv; |
| 132 int32 thisCoresIdx; | 132 int32 thisCoresIdx; |
| 133 | 133 |
| 134 //======================== Initializations ======================== | 134 //======================== Initializations ======================== |
| 135 masterEnv = (MasterEnv*)_VMSMasterEnv; | 135 masterEnv = (MasterEnv*)_VMSMasterEnv; |
| 136 | 136 |
| 137 thisCoresIdx = masterVP->coreAnimatedBy; | 137 thisCoresIdx = masterVP->coreAnimatedBy; |
| 138 animSlots = masterEnv->allAnimSlots[thisCoresIdx]; | 138 animSlots = masterEnv->allAnimSlots[thisCoresIdx]; |
| 139 | 139 |
| 140 requestHandler = masterEnv->requestHandler; | 140 requestHandler = masterEnv->requestHandler; |
| 141 slaveAssigner = masterEnv->slaveAssigner; | 141 slaveAssigner = masterEnv->slaveAssigner; |
| 142 semanticEnv = masterEnv->semanticEnv; | 142 semanticEnv = masterEnv->semanticEnv; |
| 143 | 143 |
| 144 HOLISTIC__Insert_Master_Global_Vars; | |
| 144 | 145 |
| 145 //======================== animationMaster ======================== | 146 //======================== animationMaster ======================== |
| 146 while(1){ | 147 while(1){ |
| 147 | 148 |
| 148 MEAS__Capture_Pre_Master_Point | 149 MEAS__Capture_Pre_Master_Point |
| 156 //Check if newly-done slave in slot, which will need request handld | 157 //Check if newly-done slave in slot, which will need request handld |
| 157 if( currSlot->workIsDone ) | 158 if( currSlot->workIsDone ) |
| 158 { | 159 { |
| 159 currSlot->workIsDone = FALSE; | 160 currSlot->workIsDone = FALSE; |
| 160 currSlot->needsSlaveAssigned = TRUE; | 161 currSlot->needsSlaveAssigned = TRUE; |
| 161 | 162 |
| 163 HOLISTIC__Record_AppResponder_start; | |
| 162 MEAS__startReqHdlr; | 164 MEAS__startReqHdlr; |
| 163 | 165 |
| 164 //process the requests made by the slave (held inside slave struc) | 166 //process the requests made by the slave (held inside slave struc) |
| 165 (*requestHandler)( currSlot->slaveAssignedToSlot, semanticEnv ); | 167 (*requestHandler)( currSlot->slaveAssignedToSlot, semanticEnv ); |
| 166 | 168 |
| 169 HOLISTIC__Record_AppResponder_end; | |
| 167 MEAS__endReqHdlr; | 170 MEAS__endReqHdlr; |
| 168 } | 171 } |
| 169 //If slot empty, hand to Assigner to fill with a slave | 172 //If slot empty, hand to Assigner to fill with a slave |
| 170 if( currSlot->needsSlaveAssigned ) | 173 if( currSlot->needsSlaveAssigned ) |
| 171 { //Call plugin's Assigner to give slot a new slave | 174 { //Call plugin's Assigner to give slot a new slave |
| 175 HOLISTIC__Record_Assigner_start; | |
| 172 assignedSlaveVP = | 176 assignedSlaveVP = |
| 173 (*slaveAssigner)( semanticEnv, currSlot ); | 177 (*slaveAssigner)( semanticEnv, currSlot ); |
| 174 | 178 |
| 175 //put the chosen slave into slot, and adjust flags and state | 179 //put the chosen slave into slot, and adjust flags and state |
| 176 if( assignedSlaveVP != NULL ) | 180 if( assignedSlaveVP != NULL ) |
| 177 { currSlot->slaveAssignedToSlot = assignedSlaveVP; | 181 { currSlot->slaveAssignedToSlot = assignedSlaveVP; |
| 178 assignedSlaveVP->animSlotAssignedTo = currSlot; | 182 assignedSlaveVP->animSlotAssignedTo = currSlot; |
| 179 currSlot->needsSlaveAssigned = FALSE; | 183 currSlot->needsSlaveAssigned = FALSE; |
| 180 numSlotsFilled += 1; | 184 numSlotsFilled += 1; |
| 185 | |
| 186 HOLISTIC__Record_Assigner_end; | |
| 181 } | 187 } |
| 182 } | 188 } |
| 183 } | 189 } |
| 184 | 190 |
| 185 MEAS__Capture_Post_Master_Point; | 191 MEAS__Capture_Post_Master_Point; |
