diff --git a/philo.c b/philo.c index 7eb13a2..6311040 100644 --- a/philo.c +++ b/philo.c @@ -146,7 +146,9 @@ t_philo *philo_init(t_data *data) philo->id = id++; philo->data = data; philo->nb_meal = 0; + philo->stop = 0; philo->last_eat = get_time(); + philo->last_sleep = get_time(); pthread_mutex_init(&philo->nb_meal_mutex, NULL); pthread_mutex_init(&philo->last_eat_mutex, NULL); pthread_mutex_init(&philo->last_sleep_mutex, NULL);