fix: lock mutex

This commit is contained in:
Camille Chauvet 2023-04-19 11:59:37 +00:00
parent 4e27d103a8
commit 622c2bf226

2
main.c
View File

@ -19,7 +19,9 @@ size_t get_min_meal(t_data *data)
t_philo *philo;
philo = data->philos[0];
pthread_mutex_lock(&philo->nb_meal_mutex);
min = philo->nb_meal;
pthread_mutex_unlock(&philo->nb_meal_mutex);
i = 1;
while (i < data->nb_philos)
{