/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* philo.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/05/16 14:03:01 by narnaud #+# #+# */ /* Updated: 2022/05/20 09:26:20 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef PHILOSOPHERS_H # define PHILOSOPHERS_H # include # include # include # include # include # include # include # include # include # include # include # include enum e_params { PHILO_AMOUNT, DIE_TIME, EAT_DURATION, SLEEP_DURATION, MEALS_AMOUNT, }; typedef struct s_table t_table; typedef struct s_philo { int id; size_t meals_done; int last_meal_time; t_table *table; } t_philo; typedef struct s_table { int param[5]; int i; sem_t *sptr; sem_t *death; t_philo *philos; int time; int *pid; } t_table; /***************************/ t_table *parsing(char **argv); int gettime(void); #endif