Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
diff VSs.c @ 21:feea343d202f
add support for more OmpSs features
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 29 Oct 2012 16:57:56 +0100 |
| parents | a7ca8f45c1c4 |
| children | b787a5234406 |
line diff
1.1 --- a/VSs.c Tue Sep 25 16:12:40 2012 +0200 1.2 +++ b/VSs.c Mon Oct 29 16:57:56 2012 +0100 1.3 @@ -253,6 +253,12 @@ 1.4 semanticEnv->fnSingletons[i].hasFinished = FALSE; 1.5 semanticEnv->fnSingletons[i].waitQ = makeVMSQ(); 1.6 semanticEnv->transactionStrucs[i].waitingVPQ = makeVMSQ(); 1.7 + semanticEnv->criticalSection[i].isOccupied = FALSE; 1.8 + semanticEnv->criticalSection[i].waitQ = makeVMSQ(); 1.9 +#ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 1.10 + semanticEnv->criticalSection[i].previous.vp = 0; 1.11 + semanticEnv->criticalSection[i].previous.task = 0; 1.12 +#endif 1.13 } 1.14 1.15 semanticEnv->numLiveExtraTaskSlvs = 0; //must be last 1.16 @@ -543,7 +549,41 @@ 1.17 VMS_WL__send_sem_request( &reqData, animSlv ); 1.18 } 1.19 1.20 +void 1.21 +VSs__taskwait_on(SlaveVP *animSlv,void* ptr){ 1.22 + VSsSemReq reqData; 1.23 1.24 + reqData.reqType = taskwait_on; 1.25 + reqData.callingSlv = animSlv; 1.26 + 1.27 + reqData.args = ptr; 1.28 + 1.29 + VMS_WL__send_sem_request( &reqData, animSlv ); 1.30 +} 1.31 + 1.32 +void 1.33 +VSs__start_critical(SlaveVP *animSlv,int32 name){ 1.34 + VSsSemReq reqData; 1.35 + 1.36 + reqData.reqType = critical_start; 1.37 + reqData.callingSlv = animSlv; 1.38 + 1.39 + reqData.criticalID = name; 1.40 + 1.41 + VMS_WL__send_sem_request( &reqData, animSlv ); 1.42 +} 1.43 + 1.44 +void 1.45 +VSs__end_critical(SlaveVP *animSlv,int32 name){ 1.46 + VSsSemReq reqData; 1.47 + 1.48 + reqData.reqType = critical_end; 1.49 + reqData.callingSlv = animSlv; 1.50 + 1.51 + reqData.criticalID = name; 1.52 + 1.53 + VMS_WL__send_sem_request( &reqData, animSlv ); 1.54 +} 1.55 1.56 //========================== send and receive ============================ 1.57 //
