diff 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
line diff
     1.1 --- a/VSs.h	Thu Jun 14 18:44:47 2012 -0700
     1.2 +++ b/VSs.h	Fri Jul 13 17:35:49 2012 +0200
     1.3 @@ -61,7 +61,9 @@
     1.4   }
     1.5  VSsPointerEntry;
     1.6  
     1.7 -typedef struct
     1.8 +typedef struct _VSsTaskStub VSsTaskStub;
     1.9 +
    1.10 +struct _VSsTaskStub
    1.11   {
    1.12     void       **args; //ctld args must come first, as ptrs
    1.13     VSsTaskType *taskType;
    1.14 @@ -69,8 +71,20 @@
    1.15     int32        numBlockingProp;
    1.16     SlaveVP     *slaveAssignedTo;
    1.17     VSsPointerEntry  **ptrEntries;
    1.18 +   void*        parent;
    1.19 +   bool32       parentIsTask;
    1.20 +   int32        numChildTasks;
    1.21 +   bool32         isWaiting;
    1.22   }
    1.23 -VSsTaskStub;
    1.24 +;
    1.25 +
    1.26 +typedef struct {
    1.27 +    void* parent;
    1.28 +    bool32       parentIsTask;
    1.29 +    int32        numChildTasks;
    1.30 +    bool32       isWaiting;
    1.31 +   SlaveVP     *slaveAssignedTo;    
    1.32 +} VSsThreadInfo;
    1.33  
    1.34  typedef struct
    1.35   {
    1.36 @@ -123,6 +137,7 @@
    1.37     send_from_to,
    1.38     receive_from_to,
    1.39     //===============================
    1.40 +   taskwait,
    1.41     malloc_req,
    1.42     free_req,
    1.43     singleton_fn_start,
    1.44 @@ -213,12 +228,15 @@
    1.45   };
    1.46  //TransListElem
    1.47   
    1.48 + 
    1.49 + 
    1.50  typedef struct
    1.51   {
    1.52     int32          highestTransEntered;
    1.53     TransListElem *lastTransEntered;
    1.54     bool32         needsTaskAssigned;
    1.55     VSsTaskStub   *taskStub;
    1.56 +   VSsThreadInfo *threadInfo;
    1.57   }
    1.58  VSsSemData;
    1.59   
    1.60 @@ -285,6 +303,9 @@
    1.61  VSs__end_task( SlaveVP *animSlv );
    1.62  
    1.63  //=========================
    1.64 +void
    1.65 +VSs__taskwait(SlaveVP *animSlv);
    1.66 +
    1.67  
    1.68  inline int32 *
    1.69  VSs__give_self_taskID( SlaveVP *animSlv );