comparison VMS.h @ 234:0ee1a3c8972d

Merged Nina's fix of assembly with Sean's comments and cleanup
author Some Random Person <seanhalle@yahoo.com>
date Fri, 16 Mar 2012 10:43:15 -0700
parents a0ac58d8201c 125f0f90a0d3
children ecbf6992dab4
comparison
equal deleted inserted replaced
114:4ce93ecb5e1e 115:213264c14b13
41 typedef SlaveVP *(*SlaveAssigner) ( void *, SchedSlot*); //semEnv, slot for HW info 41 typedef SlaveVP *(*SlaveAssigner) ( void *, SchedSlot*); //semEnv, slot for HW info
42 typedef void (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv 42 typedef void (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv
43 typedef void (*TopLevelFnPtr) ( void *, SlaveVP * ); //initData, animSlv 43 typedef void (*TopLevelFnPtr) ( void *, SlaveVP * ); //initData, animSlv
44 typedef void TopLevelFn ( void *, SlaveVP * ); //initData, animSlv 44 typedef void TopLevelFn ( void *, SlaveVP * ); //initData, animSlv
45 typedef void (*ResumeSlvFnPtr) ( SlaveVP *, void * ); 45 typedef void (*ResumeSlvFnPtr) ( SlaveVP *, void * );
46 //=========== MEASUREMENT STUFF ==========
47 MEAS__Insert_Counter_Handler
48 //========================================
46 49
47 //============================ HW Dependent Fns ================================ 50 //============================ HW Dependent Fns ================================
48 51
49 #include "Hardware_Dependent/VMS__HW_measurement.h" 52 #include "Hardware_Dependent/VMS__HW_measurement.h"
50 #include "Hardware_Dependent/VMS__primitives.h" 53 #include "Hardware_Dependent/VMS__primitives.h"
103 int coreOfSlot; 106 int coreOfSlot;
104 SlotPerfInfo *perfInfo; //used by assigner to pick best slave for core 107 SlotPerfInfo *perfInfo; //used by assigner to pick best slave for core
105 }; 108 };
106 //SchedSlot 109 //SchedSlot
107 110
111 enum VPtype {
112 Slave = 1, //default
113 Master,
114 Shutdown
115 };
116
108 /*This structure embodies the state of a slaveVP. It is reused for masterVP 117 /*This structure embodies the state of a slaveVP. It is reused for masterVP
109 * and shutdownVPs. 118 * and shutdownVPs.
110 */ 119 */
111 struct _SlaveVP 120 struct _SlaveVP
112 { //The offsets of these fields are hard-coded into assembly 121 { //The offsets of these fields are hard-coded into assembly
131 140
132 //=========== MEASUREMENT STUFF ========== 141 //=========== MEASUREMENT STUFF ==========
133 MEAS__Insert_Meas_Fields_into_Slave; 142 MEAS__Insert_Meas_Fields_into_Slave;
134 //======================================== 143 //========================================
135 144
136 float64 createPtInSecs; //have space but don't use on some configs 145 enum VPtype type;
146 int numTimesAssigned;
147
148 float64 createPtInSecs; //have space but don't use on some configs
137 }; 149 };
138 //SlaveVP 150 //SlaveVP
139 151
140 152
141 /* The one and only global variable, holds many odds and ends 153 /* The one and only global variable, holds many odds and ends
179 MEAS__Insert_Master_Meas_Fields_into_MasterEnv; 191 MEAS__Insert_Master_Meas_Fields_into_MasterEnv;
180 MEAS__Insert_Master_Lock_Meas_Fields_into_MasterEnv; 192 MEAS__Insert_Master_Lock_Meas_Fields_into_MasterEnv;
181 MEAS__Insert_Malloc_Meas_Fields_into_MasterEnv; 193 MEAS__Insert_Malloc_Meas_Fields_into_MasterEnv;
182 MEAS__Insert_Plugin_Meas_Fields_into_MasterEnv; 194 MEAS__Insert_Plugin_Meas_Fields_into_MasterEnv;
183 MEAS__Insert_System_Meas_Fields_into_MasterEnv; 195 MEAS__Insert_System_Meas_Fields_into_MasterEnv;
196 MEAS__Insert_Counter_Meas_Fields_into_MasterEnv;
184 //========================================== 197 //==========================================
185 } 198 }
186 MasterEnv; 199 MasterEnv;
187 200
188 //========================= Extra Stuff Data Strucs ======================= 201 //========================= Extra Stuff Data Strucs =======================
244 VMS_SS__init(); 257 VMS_SS__init();
245 258
246 void 259 void
247 VMS_SS__start_the_work_then_wait_until_done(); 260 VMS_SS__start_the_work_then_wait_until_done();
248 261
262 SlaveVP*
263 VMS_SS__create_shutdown_slave();
264
249 void 265 void
250 VMS_SS__shutdown(); 266 VMS_SS__shutdown();
251 267
252 void 268 void
253 VMS_SS__cleanup_at_end_of_shutdown(); 269 VMS_SS__cleanup_at_end_of_shutdown();