diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-01 16:39:36 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-01 16:39:36 +0100 |
| commit | a73b1e33ae3a4f55e3dd19defa1b853bc58f1eeb (patch) | |
| tree | ee14275a0f1ad9b8ddfa8feee1ee77ce0de5f285 /philo_three/src/philo_three.h | |
| parent | b9d93edf40f228fcc6e18e9e6d0a1c5db498c004 (diff) | |
| download | philosophers-a73b1e33ae3a4f55e3dd19defa1b853bc58f1eeb.tar.gz philosophers-a73b1e33ae3a4f55e3dd19defa1b853bc58f1eeb.tar.bz2 philosophers-a73b1e33ae3a4f55e3dd19defa1b853bc58f1eeb.zip | |
Fixing meal num for philo_three
Diffstat (limited to 'philo_three/src/philo_three.h')
| -rw-r--r-- | philo_three/src/philo_three.h | 9 |
1 files changed, 5 insertions, 4 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 <unistd.h> # include <fcntl.h> # include <stdlib.h> @@ -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); |
