Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
diff VSs.c @ 20:a7ca8f45c1c4
fix coding standard to work with -std=gnu99 -Wall
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 25 Sep 2012 16:12:40 +0200 |
| parents | c9606ea7abc8 |
| children | feea343d202f |
line diff
1.1 --- a/VSs.c Mon Sep 17 11:07:07 2012 +0200 1.2 +++ b/VSs.c Tue Sep 25 16:12:40 2012 +0200 1.3 @@ -281,10 +281,11 @@ 1.4 { VSsSemEnv *semanticEnv; 1.5 1.6 semanticEnv = _VMSMasterEnv->semanticEnv; 1.7 + 1.8 + #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC 1.9 FILE* output; 1.10 int n; 1.11 - char filename[255]; 1.12 - #ifdef HOLISTIC__TURN_ON_OBSERVE_UCC 1.13 + char filename[255]; 1.14 //UCC 1.15 for(n=0;n<255;n++) 1.16 { 1.17 @@ -370,27 +371,30 @@ 1.18 freeListOfArrays(semanticEnv->hwArcs); 1.19 1.20 #endif 1.21 -#ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 1.22 - for(n=0;n<255;n++) 1.23 +#ifdef HOLISTIC__TURN_ON_PERF_COUNTERS 1.24 + FILE* output2; 1.25 + int n2; 1.26 + char filename2[255]; 1.27 + for(n2=0;n2<255;n2++) 1.28 { 1.29 - sprintf(filename, "./counters/Counters.%d.csv",n); 1.30 - output = fopen(filename,"r"); 1.31 - if(output) 1.32 + sprintf(filename2, "./counters/Counters.%d.csv",n2); 1.33 + output2 = fopen(filename2,"r"); 1.34 + if(output2) 1.35 { 1.36 - fclose(output); 1.37 + fclose(output2); 1.38 }else{ 1.39 break; 1.40 } 1.41 } 1.42 - if(n<255){ 1.43 - printf("Saving Counter measurements to File: %s ...\n", filename); 1.44 - output = fopen(filename,"w+"); 1.45 - if(output!=NULL){ 1.46 - set_counter_file(output); 1.47 + if(n2<255){ 1.48 + printf("Saving Counter measurements to File: %s ...\n", filename2); 1.49 + output2 = fopen(filename2,"w+"); 1.50 + if(output2!=NULL){ 1.51 + set_counter_file(output2); 1.52 int i; 1.53 for(i=0;i<NUM_CORES;i++){ 1.54 forAllInListOfArraysDo( semanticEnv->counterList[i], &print_counter_events_to_file ); 1.55 - fflush(output); 1.56 + fflush(output2); 1.57 } 1.58 1.59 } else 1.60 @@ -447,7 +451,7 @@ 1.61 */ 1.62 void 1.63 VSs__end_thread( SlaveVP *thdToEnd ) 1.64 - { VSsSemData *semData; 1.65 + { 1.66 1.67 VMS_WL__send_dissipate_req( thdToEnd ); 1.68 } 1.69 @@ -475,7 +479,7 @@ 1.70 VMS_WL__send_sem_request( &reqData, animSlv ); 1.71 } 1.72 1.73 -inline int32 * 1.74 +int32 * 1.75 VSs__create_taskID_of_size( int32 numInts, SlaveVP *animSlv ) 1.76 { int32 *taskID; 1.77 1.78 @@ -544,7 +548,7 @@ 1.79 //========================== send and receive ============================ 1.80 // 1.81 1.82 -inline int32 * 1.83 +int32 * 1.84 VSs__give_self_taskID( SlaveVP *animSlv ) 1.85 { 1.86 return ((VSsSemData*)animSlv->semanticData)->taskStub->taskID; 1.87 @@ -726,7 +730,7 @@ 1.88 1.89 VMS_WL__send_sem_request( &reqData, animSlv ); 1.90 1.91 -EndSingletonInstrAddr: 1.92 +//EndSingletonInstrAddr: 1.93 return; 1.94 } 1.95
