Mercurial > hg > Members > Moririn
diff src/parallel_execution/context.h @ 288:f1b0cc555b6e
Add odgCommit
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 06 Feb 2017 04:04:25 +0900 |
parents | 6b099d73949c |
children | 8e7926f3e271 |
line wrap: on
line diff
--- a/src/parallel_execution/context.h Mon Feb 06 00:59:39 2017 +0900 +++ b/src/parallel_execution/context.h Mon Feb 06 04:04:25 2017 +0900 @@ -45,9 +45,9 @@ meta->size = len; \ data; }) -#define GET_TYPE(dseg) ({ \ - struct Meta* meta = (struct Meta*)(((void*)dseg) - sizeof(struct Meta));\ - meta->type; }) +#define GET_META(dseg) ((struct Meta*)(((void*)dseg) - sizeof(struct Meta))) +#define GET_TYPE(dseg) (GET_META(dseg)->type) +#define GET_WAIT_LIST(dseg) (GET_META(dseg)->wait) #define Gearef(context, t) (&(context)->data[D_##t]->t) @@ -77,6 +77,7 @@ int dataNum; int idgCount; //number of waiting dataGear int odg; + int maxOdg; int workerId; union Data **data; }; @@ -125,6 +126,7 @@ enum Code shutdown; enum Code next; struct Queue* tasks; + struct TaskManager* taskManager; } Worker; struct CPUWorker { pthread_t thread;