comparison dependency.c @ 62:64bacf647af9

moved #define of min work unit to ssr.h
author Some Random Person <seanhalle@yahoo.com>
date Sat, 10 Mar 2012 21:49:45 -0800
parents 6b723b55b9a0
children bd5ab695145c
comparison
equal deleted inserted replaced
5:27e13dd7604b 6:7ecca131c2c6
1 #include "dependency.h" 1 #include "dependency.h"
2 #include "../VMS_impl/VMS.h" 2 #include "../VMS_impl/VMS.h"
3 3
4 Dependency* new_dependency(int from_vp, int from_task, int to_vp, int to_task){ 4 Dependency* new_dependency(int from_vp, int from_task, int to_vp, int to_task){
5 Dependency* newDep = (Dependency*) VMS__malloc(sizeof(Dependency)); 5 Dependency* newDep = (Dependency*) VMS_int__malloc(sizeof(Dependency));
6 if (newDep!=NULL){ 6 if (newDep!=NULL){
7 newDep->from_vp = from_vp; 7 newDep->from_vp = from_vp;
8 newDep->from_task = from_task; 8 newDep->from_task = from_task;
9 newDep->to_vp = to_vp; 9 newDep->to_vp = to_vp;
10 newDep->to_task = to_task; 10 newDep->to_task = to_task;
11 } 11 }
12 return newDep; 12 return newDep;
13 } 13 }
14 14
15 NtoN* new_NtoN(int id){ 15 NtoN* new_NtoN(int id){
16 NtoN* newn = (NtoN*) VMS__malloc(sizeof(NtoN)); 16 NtoN* newn = (NtoN*) VMS_int__malloc(sizeof(NtoN));
17 newn->id = id; 17 newn->id = id;
18 newn->senders = makeListOfArrays(sizeof(Unit), 64); 18 newn->senders = makeListOfArrays(sizeof(Unit), 64);
19 newn->receivers = makeListOfArrays(sizeof(Unit), 64); 19 newn->receivers = makeListOfArrays(sizeof(Unit), 64);
20 return newn; 20 return newn;
21 } 21 }