view 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 source
1 #include "dependency.h"
2 #include "VMS/VMS.h"
4 Dependency* new_dependency(int from_vp, int from_task, int to_vp, int to_task){
5 Dependency* newDep = (Dependency*) VMS__malloc(sizeof(Dependency));
6 if (newDep!=NULL){
7 newDep->from_vp = from_vp;
8 newDep->from_task = from_task;
9 newDep->to_vp = to_vp;
10 newDep->to_task = to_task;
11 }
12 return newDep;
13 }
15 int set_dependency_file(FILE* file){
16 dependency_file = file;
17 }
19 void print_dependency_to_file(void* _dep){
20 Dependency* dep = (Dependency*) _dep;
21 fprintf(dependency_file,"VP_%d_%d -> VP_%d_%d;\n",dep->from_vp,dep->from_task,dep->to_vp,dep->to_task);
22 }