This commit is contained in:
Raphael 2024-07-18 18:43:38 +02:00
parent 5215c0e3f4
commit d948c639ec
3 changed files with 14 additions and 8 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/11 11:42:31 by rparodi #+# #+# */
/* Updated: 2024/07/11 18:10:49 by rparodi ### ########.fr */
/* Updated: 2024/07/18 18:38:04 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -48,6 +48,8 @@ void counting_launch(t_philo *philo, t_u8 *counter)
t_usize i;
i = 0;
if (philo->nb_eat == -1)
return ;
while (i < philo[0].nb_philo)
{
pthread_mutex_lock(philo[i].check_eating_count);