Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VOMP_impls > VOMP__MC_shared_impl
diff VOMP.h @ 1:21cf36019f0d
Partially converted SSR to VOMP -- start of changes
author | Some Random Person <seanhalle@yahoo.com> |
---|---|
date | Thu, 24 May 2012 08:57:24 -0700 |
parents | b311282ec174 |
children |
line diff
1.1 --- a/VOMP.h Sun May 20 22:07:52 2012 -0700 1.2 +++ b/VOMP.h Thu May 24 08:57:24 2012 -0700 1.3 @@ -6,8 +6,8 @@ 1.4 * 1.5 */ 1.6 1.7 -#ifndef _SSR_H 1.8 -#define _SSR_H 1.9 +#ifndef _VOMP_H 1.10 +#define _VOMP_H 1.11 1.12 #include "Queue_impl/PrivateQueue.h" 1.13 #include "Hash_impl/PrivateHash.h" 1.14 @@ -21,14 +21,14 @@ 1.15 //This is hardware dependent -- it's the number of cycles of scheduling 1.16 // overhead -- if a work unit is fewer than this, it is better being 1.17 // combined sequentially with other work 1.18 - //This value depends on both VMS overhead and SSR's plugin. At some point 1.19 - // it will be derived by perf-counter measurements during init of SSR 1.20 + //This value depends on both VMS overhead and VOMP's plugin. At some point 1.21 + // it will be derived by perf-counter measurements during init of VOMP 1.22 #define MIN_WORK_UNIT_CYCLES 20000 1.23 1.24 //=========================================================================== 1.25 -/*This header defines everything specific to the SSR semantic plug-in 1.26 +/*This header defines everything specific to the VOMP semantic plug-in 1.27 */ 1.28 -typedef struct _SSRSemReq SSRSemReq; 1.29 +typedef struct _VOMPSemReq VOMPSemReq; 1.30 typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master 1.31 //=========================================================================== 1.32 1.33 @@ -41,7 +41,7 @@ 1.34 SlaveVP *VPCurrentlyExecuting; 1.35 PrivQueueStruc *waitingVPQ; 1.36 } 1.37 -SSRTrans; 1.38 +VOMPTrans; 1.39 1.40 /*WARNING: assembly hard-codes position of endInstrAddr as first field 1.41 */ 1.42 @@ -52,9 +52,9 @@ 1.43 int32 hasFinished; 1.44 PrivQueueStruc *waitQ; 1.45 } 1.46 -SSRSingleton; 1.47 +VOMPSingleton; 1.48 1.49 -enum SSRReqType 1.50 +enum VOMPReqType 1.51 { 1.52 send_type = 1, 1.53 send_from_to, 1.54 @@ -74,13 +74,13 @@ 1.55 trans_end 1.56 }; 1.57 1.58 -struct _SSRSemReq 1.59 - { enum SSRReqType reqType; 1.60 +struct _VOMPSemReq 1.61 + { enum VOMPReqType reqType; 1.62 SlaveVP *sendPr; 1.63 SlaveVP *receivePr; 1.64 int32 msgType; 1.65 void *msg; 1.66 - SSRSemReq *nextReqInHashEntry; 1.67 + VOMPSemReq *nextReqInHashEntry; 1.68 1.69 void *initData; 1.70 TopLevelFnPtr fnPtr; 1.71 @@ -90,14 +90,14 @@ 1.72 void *ptrToFree; 1.73 1.74 int32 singletonID; 1.75 - SSRSingleton **singletonPtrAddr; 1.76 + VOMPSingleton **singletonPtrAddr; 1.77 1.78 PtrToAtomicFn fnToExecInMaster; 1.79 void *dataForFn; 1.80 1.81 int32 transID; 1.82 } 1.83 -/* SSRSemReq */; 1.84 +/* VOMPSemReq */; 1.85 1.86 1.87 typedef struct 1.88 @@ -109,8 +109,8 @@ 1.89 int32 primitiveStartTime; 1.90 1.91 //fix limit on num with dynArray 1.92 - SSRSingleton fnSingletons[NUM_STRUCS_IN_SEM_ENV]; 1.93 - SSRTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; 1.94 + VOMPSingleton fnSingletons[NUM_STRUCS_IN_SEM_ENV]; 1.95 + VOMPTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; 1.96 1.97 #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC 1.98 ListOfArrays* unitList; 1.99 @@ -129,7 +129,7 @@ 1.100 SlaveVP* idlePr[NUM_CORES][NUM_ANIM_SLOTS]; 1.101 int shutdownInitiated; 1.102 } 1.103 -SSRSemEnv; 1.104 +VOMPSemEnv; 1.105 1.106 1.107 typedef struct _TransListElem TransListElem; 1.108 @@ -145,124 +145,124 @@ 1.109 int32 highestTransEntered; 1.110 TransListElem *lastTransEntered; 1.111 } 1.112 -SSRSemData; 1.113 +VOMPSemData; 1.114 1.115 //=========================================================================== 1.116 1.117 void 1.118 -SSR__create_seed_procr_and_do_work( TopLevelFnPtr fn, void *initData ); 1.119 +VOMP__create_seed_procr_and_do_work( TopLevelFnPtr fn, void *initData ); 1.120 1.121 int32 1.122 -SSR__giveMinWorkUnitCycles( float32 percentOverhead ); 1.123 +VOMP__giveMinWorkUnitCycles( float32 percentOverhead ); 1.124 1.125 void 1.126 -SSR__start_primitive(); 1.127 +VOMP__start_primitive(); 1.128 1.129 int32 1.130 -SSR__end_primitive_and_give_cycles(); 1.131 +VOMP__end_primitive_and_give_cycles(); 1.132 1.133 int32 1.134 -SSR__giveIdealNumWorkUnits(); 1.135 +VOMP__giveIdealNumWorkUnits(); 1.136 1.137 int32 1.138 -SSR__give_number_of_cores_to_schedule_onto(); 1.139 +VOMP__give_number_of_cores_to_schedule_onto(); 1.140 1.141 //======================= 1.142 1.143 void 1.144 -SSR__init(); 1.145 +VOMP__init(); 1.146 1.147 void 1.148 -SSR__cleanup_after_shutdown(); 1.149 +VOMP__cleanup_after_shutdown(); 1.150 1.151 //======================= 1.152 1.153 SlaveVP * 1.154 -SSR__create_procr_with( TopLevelFnPtr fnPtr, void *initData, 1.155 +VOMP__create_procr_with( TopLevelFnPtr fnPtr, void *initData, 1.156 SlaveVP *creatingSlv ); 1.157 1.158 SlaveVP * 1.159 -SSR__create_procr_with_affinity( TopLevelFnPtr fnPtr, void *initData, 1.160 +VOMP__create_procr_with_affinity( TopLevelFnPtr fnPtr, void *initData, 1.161 SlaveVP *creatingPr, int32 coreToAssignOnto); 1.162 1.163 void 1.164 -SSR__dissipate_procr( SlaveVP *procrToDissipate ); 1.165 +VOMP__dissipate_procr( SlaveVP *procrToDissipate ); 1.166 1.167 //======================= 1.168 void * 1.169 -SSR__malloc_to( int numBytes, SlaveVP *ownerSlv ); 1.170 +VOMP__malloc_to( int numBytes, SlaveVP *ownerSlv ); 1.171 1.172 void 1.173 -SSR__free( void *ptrToFree, SlaveVP *owningSlv ); 1.174 +VOMP__free( void *ptrToFree, SlaveVP *owningSlv ); 1.175 1.176 void 1.177 -SSR__transfer_ownership_of_from_to( void *data, SlaveVP *oldOwnerPr, 1.178 +VOMP__transfer_ownership_of_from_to( void *data, SlaveVP *oldOwnerPr, 1.179 SlaveVP *newOwnerSlv ); 1.180 1.181 void 1.182 -SSR__add_ownership_by_to( SlaveVP *newOwnerPr, void *data ); 1.183 +VOMP__add_ownership_by_to( SlaveVP *newOwnerPr, void *data ); 1.184 1.185 void 1.186 -SSR__remove_ownership_by_from( SlaveVP *loserPr, void *dataLosing ); 1.187 +VOMP__remove_ownership_by_from( SlaveVP *loserPr, void *dataLosing ); 1.188 1.189 void 1.190 -SSR__transfer_ownership_to_outside( void *dataToTransferOwnershipOf ); 1.191 +VOMP__transfer_ownership_to_outside( void *dataToTransferOwnershipOf ); 1.192 1.193 1.194 1.195 //======================= 1.196 void 1.197 -SSR__send_of_type_to( SlaveVP *sendPr, void *msg, const int type, 1.198 +VOMP__send_of_type_to( SlaveVP *sendPr, void *msg, const int type, 1.199 SlaveVP *receivePr); 1.200 1.201 void 1.202 -SSR__send_from_to( void *msg, SlaveVP *sendPr, SlaveVP *receivePr); 1.203 +VOMP__send_from_to( void *msg, SlaveVP *sendPr, SlaveVP *receivePr); 1.204 1.205 void * 1.206 -SSR__receive_type_to( const int type, SlaveVP *receiveSlv ); 1.207 +VOMP__receive_type_to( const int type, SlaveVP *receiveSlv ); 1.208 1.209 void * 1.210 -SSR__receive_from_to( SlaveVP *sendPr, SlaveVP *receiveSlv ); 1.211 +VOMP__receive_from_to( SlaveVP *sendPr, SlaveVP *receiveSlv ); 1.212 1.213 1.214 //======================= Concurrency Stuff ====================== 1.215 void 1.216 -SSR__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 1.217 +VOMP__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 1.218 1.219 void 1.220 -SSR__end_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 1.221 +VOMP__end_fn_singleton( int32 singletonID, SlaveVP *animSlv ); 1.222 1.223 void 1.224 -SSR__start_data_singleton( SSRSingleton **singeltonAddr, SlaveVP *animSlv ); 1.225 +VOMP__start_data_singleton( VOMPSingleton **singeltonAddr, SlaveVP *animSlv ); 1.226 1.227 void 1.228 -SSR__end_data_singleton( SSRSingleton **singletonAddr, SlaveVP *animSlv ); 1.229 +VOMP__end_data_singleton( VOMPSingleton **singletonAddr, SlaveVP *animSlv ); 1.230 1.231 void 1.232 -SSR__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 1.233 +VOMP__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 1.234 void *data, SlaveVP *animSlv ); 1.235 1.236 void 1.237 -SSR__start_transaction( int32 transactionID, SlaveVP *animSlv ); 1.238 +VOMP__start_transaction( int32 transactionID, SlaveVP *animSlv ); 1.239 1.240 void 1.241 -SSR__end_transaction( int32 transactionID, SlaveVP *animSlv ); 1.242 +VOMP__end_transaction( int32 transactionID, SlaveVP *animSlv ); 1.243 1.244 1.245 //========================= Internal use only ============================= 1.246 void 1.247 -SSR__Request_Handler( SlaveVP *requestingPr, void *_semEnv ); 1.248 +VOMP__Request_Handler( SlaveVP *requestingPr, void *_semEnv ); 1.249 1.250 SlaveVP * 1.251 -SSR__assign_slaveVP_to_slot( void *_semEnv, AnimSlot *slot ); 1.252 +VOMP__assign_slaveVP_to_slot( void *_semEnv, AnimSlot *slot ); 1.253 1.254 SlaveVP* 1.255 -SSR__create_procr_helper( TopLevelFnPtr fnPtr, void *initData, 1.256 - SSRSemEnv *semEnv, int32 coreToAssignOnto ); 1.257 +VOMP__create_procr_helper( TopLevelFnPtr fnPtr, void *initData, 1.258 + VOMPSemEnv *semEnv, int32 coreToAssignOnto ); 1.259 1.260 //===================== Measurement of Lang Overheads ===================== 1.261 -#include "SSR_Measurement.h" 1.262 +#include "VOMP_Measurement.h" 1.263 1.264 //=========================================================================== 1.265 -#endif /* _SSR_H */ 1.266 +#endif /* _VOMP_H */ 1.267