comparison PR.h @ 267:608833ae2c5d

Checkpoint -- about to clean up AnimationMaster, deleting a bunch of stuff
author Sean Halle <seanhalle@yahoo.com>
date Sun, 04 Nov 2012 18:39:28 -0800
parents a5fa1e087c7e
children e5bd470b562b
comparison
equal deleted inserted replaced
2:bcc07311f71e 3:9841b0a45663
76 { 76 {
77 enum PRReqstType reqType;//used for special forms that have PR behavior 77 enum PRReqstType reqType;//used for special forms that have PR behavior
78 void *semReq; 78 void *semReq;
79 PRProcess *processReqIsIn; 79 PRProcess *processReqIsIn;
80 int32 langMagicNumber; 80 int32 langMagicNumber;
81 PRMetaTask *metaTask;
82 TopLevelFn topLevelFn; 81 TopLevelFn topLevelFn;
83 void *initData; 82 void *initData;
84 int32 *ID; 83 int32 *ID;
85 84
86 //The request handling structure is a bit messy.. for special forms, 85 //The request handling structure is a bit messy.. for special forms,
119 SlotPerfInfo; 118 SlotPerfInfo;
120 119
121 struct _AnimSlot 120 struct _AnimSlot
122 { 121 {
123 int workIsDone; 122 int workIsDone;
124 int needsSlaveAssigned; 123 int needsWorkAssigned;
125 SlaveVP *slaveAssignedToSlot; 124 SlaveVP *slaveAssignedToSlot;
126 125
127 int slotIdx; //needed by Holistic Model's data gathering 126 int slotIdx; //needed by Holistic Model's data gathering
128 int coreSlotIsOn; 127 int coreSlotIsOn;
129 SlotPerfInfo *perfInfo; //used by assigner to pick best slave for core 128 SlotPerfInfo *perfInfo; //used by assigner to pick best slave for core
169 168
170 //For language specific data that needs to be in the slave 169 //For language specific data that needs to be in the slave
171 void *semanticData; //Lang saves lang-specific things in slave here 170 void *semanticData; //Lang saves lang-specific things in slave here
172 171
173 //Task related stuff 172 //Task related stuff
174 bool needsTaskAssigned; 173 // bool needsTaskAssigned;
175 174
176 //=========== MEASUREMENT STUFF ========== 175 //=========== MEASUREMENT STUFF ==========
177 MEAS__Insert_Meas_Fields_into_Slave; 176 MEAS__Insert_Meas_Fields_into_Slave;
178 float64 createPtInSecs; //time VP created, in seconds 177 float64 createPtInSecs; //time VP created, in seconds
179 //======================================== 178 //========================================
283 } 282 }
284 PRServSemEnv; 283 PRServSemEnv;
285 284
286 enum PRTaskType 285 enum PRTaskType
287 { GenericSlave = 1, 286 { GenericSlave = 1,
288 AtomicTask, 287 SlotTask,
289 SuspendedTask 288 FreeTask
290 }; 289 };
291 290
292 struct _PRMetaTask 291 struct _PRMetaTask
293 { 292 {
294 PRTaskType taskType; 293 PRTaskType taskType;
316 typedef struct 315 typedef struct
317 { 316 {
318 void (*freeFn)(void *); 317 void (*freeFn)(void *);
319 } 318 }
320 PRSemDataTemplate; 319 PRSemDataTemplate;
320
321 typedef struct
322 {
323 void (*recycler)(void *);
324 void *langSemData;
325 }
326 PRSemData;
321 327
322 typedef struct 328 typedef struct
323 { PRSemDataTemplate **semDatas; 329 { PRSemDataTemplate **semDatas;
324 PRSemDataTemplate **semDatasIter; 330 PRSemDataTemplate **semDatasIter;
325 int32 numSemDatas; 331 int32 numSemDatas;
340 int32 numLiveGenericSlvs; 346 int32 numLiveGenericSlvs;
341 int32 numLiveFreeTaskSlvs; 347 int32 numLiveFreeTaskSlvs;
342 int32 numLiveTasks; 348 int32 numLiveTasks;
343 // bool32 coreIsDone[NUM_CORES][CACHE_LINE_SZ]; //Fixes false sharing 349 // bool32 coreIsDone[NUM_CORES][CACHE_LINE_SZ]; //Fixes false sharing
344 350
345 PrivQ *freeTaskSlvRecycleQ; 351 PrivQueueStruc *freeTaskSlvRecycleQ;
346 SlaveVP slotTaskSlvs[NUM_CORES][NUM_ANIM_SLOTS]; 352 SlaveVP slotTaskSlvs[NUM_CORES][NUM_ANIM_SLOTS];
347 void *resultToReturn; 353 void *resultToReturn;
348 354
349 SlaveVP *seedSlv; 355 SlaveVP *seedSlv;
356
357 SlaveAssigner overrideAssigner;
350 358
351 //These are used to coord with OS thread waiting for process to end 359 //These are used to coord with OS thread waiting for process to end
352 bool32 executionIsComplete; 360 bool32 executionIsComplete;
353 pthread_mutex_t doneLock; 361 pthread_mutex_t doneLock;
354 pthread_cond_t doneCond; 362 pthread_cond_t doneCond;