diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-04 12:20:25 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-04 12:20:25 +0100 |
| commit | 907debbb7d1e7ccc4914805cfe4acbed92b82bcc (patch) | |
| tree | 199d60e60d9d9b689062c5f08d6381c090127619 /philo_three/src/philo_three.h | |
| parent | 7e971b3fa805c40d02ac3e996ab1d181f9584866 (diff) | |
| download | philosophers-907debbb7d1e7ccc4914805cfe4acbed92b82bcc.tar.gz philosophers-907debbb7d1e7ccc4914805cfe4acbed92b82bcc.tar.bz2 philosophers-907debbb7d1e7ccc4914805cfe4acbed92b82bcc.zip | |
Added buffered output, Added waiting for all to be started
Diffstat (limited to 'philo_three/src/philo_three.h')
| -rw-r--r-- | philo_three/src/philo_three.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/philo_three/src/philo_three.h b/philo_three/src/philo_three.h index 3d6b138..fe3441b 100644 --- a/philo_three/src/philo_three.h +++ b/philo_three/src/philo_three.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/15 00:46:26 by cacharle #+# #+# */ -/* Updated: 2021/01/03 13:51:54 by cacharle ### ########.fr */ +/* Updated: 2021/01/04 11:01:18 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -26,6 +26,7 @@ # define PHILO_SEM_NAME "semaphore_philo_three" # define PHILO_SEM_STDOUT_NAME "semaphore_philo_three_stdout" # define PHILO_SEM_FINISH_NAME "semaphore_philo_three_finish" +# define PHILO_SEM_START_NAME "semaphore_philo_three_start" typedef struct s_philo { @@ -36,6 +37,7 @@ typedef struct s_philo sem_t *forks; sem_t *sem_stdout; sem_t *sem_finish; + sem_t *sem_start; } t_philo; typedef struct s_sems @@ -43,6 +45,7 @@ typedef struct s_sems sem_t *forks; sem_t *sem_stdout; sem_t *sem_finish; + sem_t *sem_start; } t_sems; pid_t child_start(t_philo *arg); |
