Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
diff dependency.c @ 39:6a367b5d9a2d
Separate UCC recording from VMS core and put it into SSR plugin
| author | Nina Engelhardt |
|---|---|
| date | Mon, 05 Dec 2011 19:00:51 +0100 |
| parents | |
| children | bde026832af7 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dependency.c Mon Dec 05 19:00:51 2011 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +#include "dependency.h" 1.5 +#include "VMS/VMS.h" 1.6 + 1.7 +Dependency* new_dependency(int from_vp, int from_task, int to_vp, int to_task){ 1.8 + Dependency* newDep = (Dependency*) VMS__malloc(sizeof(Dependency)); 1.9 + if (newDep!=NULL){ 1.10 + newDep->from_vp = from_vp; 1.11 + newDep->from_task = from_task; 1.12 + newDep->to_vp = to_vp; 1.13 + newDep->to_task = to_task; 1.14 + } 1.15 + return newDep; 1.16 +} 1.17 + 1.18 +int set_dependency_file(FILE* file){ 1.19 + dependency_file = file; 1.20 +} 1.21 + 1.22 +void print_dependency_to_file(void* _dep){ 1.23 + Dependency* dep = (Dependency*) _dep; 1.24 + fprintf(dependency_file,"VP_%d_%d -> VP_%d_%d;\n",dep->from_vp,dep->from_task,dep->to_vp,dep->to_task); 1.25 +}
