Mercurial > hg > CbC > old > DPP
diff dpp2.h @ 5:a04eccfc69ae
Remove warnings in dpp2
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 25 Dec 2015 17:15:49 +0900 |
parents | b15128ab0324 |
children | 4a68716b7488 |
line wrap: on
line diff
--- a/dpp2.h Fri Dec 25 16:00:52 2015 +0900 +++ b/dpp2.h Fri Dec 25 17:15:49 2015 +0900 @@ -1,9 +1,27 @@ #ifndef _DPP2_H_ #define _DPP2_H_ -#define NULL (0) #include "dpp_common.h" -#include "queue.h" + +struct task; +typedef struct phils { + int id; + struct fork *right_fork; + struct fork *left_fork; + struct phils *right; + struct phils *left; + __code (*next)(struct phils *, struct task *); +} Phils, *PhilsPtr; + +typedef struct fork { + int id; + struct phils *owner; +} Fork, *ForkPtr; + +typedef struct task { + struct task *next; + struct phils *phils; +} Task, *TaskPtr; extern __code putdown_lfork(PhilsPtr self, TaskPtr current_task);