diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-10 10:54:04 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-10 10:54:04 +0100 |
| commit | eb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb (patch) | |
| tree | efff80bbbc2157979eaae006f6835d020062dba9 /philo_three/src/philo_three.h | |
| parent | 802ea8347d1ceb7a02cf279359b3b101106fab94 (diff) | |
| download | philosophers-eb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb.tar.gz philosophers-eb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb.tar.bz2 philosophers-eb2cfb574efafcf2c3c6200d1cd2de700ec8ddfb.zip | |
Fixing bad performance at school by adding more delay to the death checking loop, Added mutex/semaphore to protect against eating and dying at the same time
Diffstat (limited to 'philo_three/src/philo_three.h')
| -rw-r--r-- | philo_three/src/philo_three.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/philo_three/src/philo_three.h b/philo_three/src/philo_three.h index 18c7bcb..f11b8c7 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/09 15:47:32 by charles ### ########.fr */ +/* Updated: 2021/01/10 10:26:27 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -58,6 +58,7 @@ typedef struct s_philo sem_t *sem_meal_num; sem_t *sem_start; sem_t *sem_grab; + sem_t *sem_eat; } t_philo; pid_t child_start(t_philo *arg); |
