Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/ppe/Task.h @ 699:8ece2ac85149 draft
....
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 13 Dec 2009 22:46:15 +0900 |
parents | 72b2da99e875 |
children | ef08dd70eafb |
comparison
equal
deleted
inserted
replaced
698:72b2da99e875 | 699:8ece2ac85149 |
---|---|
56 // int add_inData_t(memaddr addr, int size); | 56 // int add_inData_t(memaddr addr, int size); |
57 // int add_outData_t(memaddr addr, int size); | 57 // int add_outData_t(memaddr addr, int size); |
58 | 58 |
59 void print(); | 59 void print(); |
60 | 60 |
61 int const offset() { return (memaddr)data-(memaddr)&task_size; } | |
62 | |
63 // on host | |
61 memaddr param(int index) { | 64 memaddr param(int index) { |
62 return (memaddr)data + sizeof(memaddr)*index; | 65 return (memaddr)data + sizeof(memaddr)*index; |
63 } | 66 } |
67 // on host | |
64 memaddr inData(int index) { | 68 memaddr inData(int index) { |
65 memaddr p = (memaddr)data + inData_offset; | 69 memaddr p = (memaddr)data + inData_offset; |
66 return p + sizeof(ListElement)*index; | 70 return p + sizeof(ListElement)*index; |
67 } | 71 } |
72 // on host | |
68 memaddr outData(int index) { | 73 memaddr outData(int index) { |
69 memaddr p = (memaddr)data + outData_offset; | 74 memaddr p = (memaddr)data + outData_offset; |
70 return p + sizeof(ListElement)* index; | 75 return p + sizeof(ListElement)* index; |
71 } | 76 } |
72 | 77 |
78 // on client | |
79 memaddr get_param(int index) { | |
80 memaddr data = (memaddr)this + offset(); | |
81 return (memaddr)data + sizeof(memaddr)*index; | |
82 } | |
83 // on client | |
73 ListElement *inListData() { | 84 ListElement *inListData() { |
74 memaddr data = (memaddr)this; | 85 memaddr data = (memaddr)this + offset(); |
75 ListElement *list = (ListElement *)(data+inData_offset); | 86 ListElement *list = (ListElement *)(data+inData_offset); |
76 return list; | 87 return list; |
77 } | 88 } |
78 | 89 |
90 // on client | |
79 ListElement *outListData() { | 91 ListElement *outListData() { |
80 memaddr data = (memaddr)this; | 92 memaddr data = (memaddr)this + offset(); |
81 ListElement *list = (ListElement *)(data+outData_offset); | 93 ListElement *list = (ListElement *)(data+outData_offset); |
82 return list; | 94 return list; |
83 } | 95 } |
84 | 96 |
85 void set_param_length(int i) { | 97 void set_param_length(int i) { |