From a73b1e33ae3a4f55e3dd19defa1b853bc58f1eeb Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 1 Jan 2021 16:39:36 +0100 Subject: Fixing meal num for philo_three --- philo_three/src/philo_three.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'philo_three/src/philo_three.h') diff --git a/philo_three/src/philo_three.h b/philo_three/src/philo_three.h index bb41343..380efc5 100644 --- a/philo_three/src/philo_three.h +++ b/philo_three/src/philo_three.h @@ -6,13 +6,14 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/15 00:46:26 by cacharle #+# #+# */ -/* Updated: 2020/10/24 13:02:33 by charles ### ########.fr */ +/* Updated: 2021/01/01 15:34:04 by charles ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef PHILO_THREE_H # define PHILO_THREE_H +# define _XOPEN_SOURCE 500 # include # include # include @@ -24,7 +25,7 @@ # define PHILO_SEM_NAME "semaphore_philo_three" # define PHILO_SEM_STDOUT_NAME "semaphore_philo_three_stdout" -# define PHILO_SEM_DEAD_NAME "semaphore_philo_three_dead" +# define PHILO_SEM_FINISH_NAME "semaphore_philo_three_finish" typedef struct s_philo { @@ -33,14 +34,14 @@ typedef struct s_philo t_time time_last_eat; sem_t *forks; sem_t *sem_stdout; - sem_t *sem_dead; + sem_t *sem_finish; } t_philo; typedef struct s_sems { sem_t *forks; sem_t *sem_stdout; - sem_t *sem_dead; + sem_t *sem_finish; } t_sems; pid_t child_start(t_philo *arg); -- cgit