Mercurial > hg > CbC > old > DPP
view dpp_common.h @ 11:190dadd8405b
Format indent
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 02 Jul 2019 19:52:09 +0900 |
parents | a15437a1e94c |
children |
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, PutDownFork }; 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