aboutsummaryrefslogtreecommitdiff
path: root/philo_one/src/philo.c
diff options
context:
space:
mode:
Diffstat (limited to 'philo_one/src/philo.c')
-rw-r--r--philo_one/src/philo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/philo_one/src/philo.c b/philo_one/src/philo.c
index 911f6b9..8a41fe7 100644
--- a/philo_one/src/philo.c
+++ b/philo_one/src/philo.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/09 23:47:14 by cacharle #+# #+# */
-/* Updated: 2021/01/09 14:39:03 by charles ### ########.fr */
+/* Updated: 2021/01/10 09:49:48 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,6 +30,7 @@ t_philo *philos_new(t_philo_conf *conf, pthread_mutex_t *forks)
philos[i].fork_right = forks + (i + 1) % conf->philo_num;
pthread_mutex_init(&philos[i].mutex_start, NULL);
pthread_mutex_lock(&philos[i].mutex_start);
+ pthread_mutex_init(&philos[i].mutex_eat, NULL);
}
return (philos);
}