Mercurial > hg > CbC > old > DPP
view dpp_common.h @ 7:171cc032eb29
Fix tableau2
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 25 Dec 2015 18:31:20 +0900 |
parents | 4a68716b7488 |
children | a15437a1e94c |
line wrap: on
line source
#ifndef _DPP_COMMON_H_ #define _DPP_COMMON_H_ #include<stdio.h> #include<stdlib.h> enum Action { PutDownLeftFork, PutDownRightFork, Eating, WaitLeftFork, WaitRightFork, PickUpLeftFork, PickUpRightFork, Thinking, }; typedef struct phils { int id; struct fork *right_fork; struct fork *left_fork; struct phils *right; struct phils *left; enum Action next; } Phils, *PhilsPtr; typedef struct fork { int id; struct phils *owner; } Fork, *ForkPtr; typedef struct task { struct task *next; struct phils *phils; } Task, *TaskPtr; #endif