Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff VMS.h @ 230:f2a7831352dc
changed SchedulingMaster.c to AnimationMaster.c and cleaned up all comments
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Thu, 15 Mar 2012 20:31:41 -0700 |
| parents | 5c475c4b7b49 |
| children | 88fd85921d7f |
line diff
1.1 --- a/VMS.h Thu Mar 15 06:36:37 2012 -0700 1.2 +++ b/VMS.h Thu Mar 15 20:31:41 2012 -0700 1.3 @@ -44,7 +44,7 @@ 1.4 typedef struct _GateStruc GateStruc; 1.5 1.6 1.7 -typedef SlaveVP *(*SlaveAssigner) ( void *, int, SchedSlot *); //semEnv, coreIdx, slot for HW info 1.8 +typedef SlaveVP *(*SlaveAssigner) ( void *, SchedSlot*); //semEnv, slot for HW info 1.9 typedef void (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv 1.10 typedef void (*TopLevelFnPtr) ( void *, SlaveVP * ); //initData, animSlv 1.11 typedef void TopLevelFn ( void *, SlaveVP * ); //initData, animSlv 1.12 @@ -98,10 +98,13 @@ 1.13 1.14 struct _SchedSlot 1.15 { 1.16 - int slotIdx; //needed by Holistic Model's data gathering 1.17 - int workIsDone; 1.18 - int needsSlaveAssigned; 1.19 - SlaveVP *slaveAssignedToSlot; 1.20 + int workIsDone; 1.21 + int needsSlaveAssigned; 1.22 + SlaveVP *slaveAssignedToSlot; 1.23 + 1.24 + int slotIdx; //needed by Holistic Model's data gathering 1.25 + int coreOfSlot; 1.26 + SlotPerfInfo *perfInfo; //used by assigner to pick best slave for core 1.27 }; 1.28 //SchedSlot 1.29 1.30 @@ -134,41 +137,46 @@ 1.31 }; 1.32 //SlaveVP 1.33 1.34 - 1.35 -/*WARNING: re-arranging this data structure could cause Slv-switching 1.36 - * assembly code to fail -- hard-codes offsets of fields 1.37 - * (because -O3 messes with things otherwise) 1.38 +/*The one and only global variable, holds many odds and ends 1.39 */ 1.40 typedef struct 1.41 - { //The offset of these fields is hard-coded into assembly 1.42 + { //The offsets of these fields are hard-coded into assembly 1.43 void *coreCtlrReturnPt; //offset of field used in asm 1.44 int32 masterLock __align_to_cacheline__; //used in asm 1.45 1.46 - //below this, no asm uses the field offsets 1.47 + //============ below this, no asm uses the field offsets ============= 1.48 + 1.49 + //Basic VMS infrastructure 1.50 + SlaveVP **masterVPs; 1.51 + SchedSlot ***allSchedSlots; 1.52 + 1.53 + //plugin related 1.54 SlaveAssigner slaveAssigner; 1.55 RequestHandler requestHandler; 1.56 + void *semanticEnv; 1.57 1.58 - SchedSlot ***allSchedSlots; 1.59 - SlaveVP **masterVPs; 1.60 + //Slave creation 1.61 + int32 numSlavesCreated; //gives ordering to processor creation 1.62 + int32 numSlavesAlive; //used to detect fail-safe shutdown 1.63 1.64 - void *semanticEnv; 1.65 - void *OSEventStruc; //for future, when add I/O to BLIS 1.66 + //Initialization related 1.67 + int32 setupComplete; //use while starting up coreCtlr 1.68 + 1.69 + //Memory management related 1.70 MallocArrays *freeLists; 1.71 - int32 amtOfOutstandingMem; //total currently allocated 1.72 - 1.73 - int32 setupComplete; //use while starting up coreCtlr 1.74 + int32 amtOfOutstandingMem;//total currently allocated 1.75 + 1.76 + //Work-stealing related 1.77 GateStruc *workStealingGates[ NUM_CORES ]; //concurrent work-steal 1.78 int32 workStealingLock; 1.79 1.80 - int32 numSlavesCreated; //gives ordering to processor creation 1.81 - int32 numSlavesAlive; //used to detect when to shutdown 1.82 - 1.83 + 1.84 //=========== MEASUREMENT STUFF ============= 1.85 IntervalProbe **intervalProbes; 1.86 PrivDynArrayInfo *dynIntervalProbesInfo; 1.87 HashTable *probeNameHashTbl; 1.88 int32 masterCreateProbeID; 1.89 - float64 createPtInSecs; 1.90 + float64 createPtInSecs; //real-clock time VMS initialized 1.91 Histogram **measHists; 1.92 PrivDynArrayInfo *measHistsInfo; 1.93 MEAS__Insert_Susp_Meas_Fields_into_MasterEnv; 1.94 @@ -201,7 +209,7 @@ 1.95 1.96 void * coreController( void *paramsIn ); //standard PThreads fn prototype 1.97 void * coreCtlr_Seq( void *paramsIn ); //standard PThreads fn prototype 1.98 -void schedulingMaster( void *initData, SlaveVP *masterVP ); 1.99 +void animationMaster( void *initData, SlaveVP *masterVP ); 1.100 1.101 1.102 typedef struct
