comparison VSs.h @ 5:8188c5b4bfd7

implemented taskwait
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Fri, 13 Jul 2012 17:35:49 +0200
parents 13af59ed7ea5
children 1780f6b00e3d
comparison
equal deleted inserted replaced
4:6f7344382872 5:3cb2af1de854
59 int32 numEnabledNonDoneReaders; 59 int32 numEnabledNonDoneReaders;
60 PrivQueueStruc *waitersQ; 60 PrivQueueStruc *waitersQ;
61 } 61 }
62 VSsPointerEntry; 62 VSsPointerEntry;
63 63
64 typedef struct 64 typedef struct _VSsTaskStub VSsTaskStub;
65
66 struct _VSsTaskStub
65 { 67 {
66 void **args; //ctld args must come first, as ptrs 68 void **args; //ctld args must come first, as ptrs
67 VSsTaskType *taskType; 69 VSsTaskType *taskType;
68 int32 *taskID; 70 int32 *taskID;
69 int32 numBlockingProp; 71 int32 numBlockingProp;
70 SlaveVP *slaveAssignedTo; 72 SlaveVP *slaveAssignedTo;
71 VSsPointerEntry **ptrEntries; 73 VSsPointerEntry **ptrEntries;
72 } 74 void* parent;
73 VSsTaskStub; 75 bool32 parentIsTask;
76 int32 numChildTasks;
77 bool32 isWaiting;
78 }
79 ;
80
81 typedef struct {
82 void* parent;
83 bool32 parentIsTask;
84 int32 numChildTasks;
85 bool32 isWaiting;
86 SlaveVP *slaveAssignedTo;
87 } VSsThreadInfo;
74 88
75 typedef struct 89 typedef struct
76 { 90 {
77 VSsTaskStub *taskStub; 91 VSsTaskStub *taskStub;
78 int32 argNum; 92 int32 argNum;
121 send_type_to, 135 send_type_to,
122 receive_type_to, 136 receive_type_to,
123 send_from_to, 137 send_from_to,
124 receive_from_to, 138 receive_from_to,
125 //=============================== 139 //===============================
140 taskwait,
126 malloc_req, 141 malloc_req,
127 free_req, 142 free_req,
128 singleton_fn_start, 143 singleton_fn_start,
129 singleton_fn_end, 144 singleton_fn_end,
130 singleton_data_start, 145 singleton_data_start,
211 int32 transID; 226 int32 transID;
212 TransListElem *nextTrans; 227 TransListElem *nextTrans;
213 }; 228 };
214 //TransListElem 229 //TransListElem
215 230
231
232
216 typedef struct 233 typedef struct
217 { 234 {
218 int32 highestTransEntered; 235 int32 highestTransEntered;
219 TransListElem *lastTransEntered; 236 TransListElem *lastTransEntered;
220 bool32 needsTaskAssigned; 237 bool32 needsTaskAssigned;
221 VSsTaskStub *taskStub; 238 VSsTaskStub *taskStub;
239 VSsThreadInfo *threadInfo;
222 } 240 }
223 VSsSemData; 241 VSsSemData;
224 242
225 //=========================================================================== 243 //===========================================================================
226 244
283 301
284 void 302 void
285 VSs__end_task( SlaveVP *animSlv ); 303 VSs__end_task( SlaveVP *animSlv );
286 304
287 //========================= 305 //=========================
306 void
307 VSs__taskwait(SlaveVP *animSlv);
308
288 309
289 inline int32 * 310 inline int32 *
290 VSs__give_self_taskID( SlaveVP *animSlv ); 311 VSs__give_self_taskID( SlaveVP *animSlv );
291 312
292 void 313 void