1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
philosopher/philo/start_philo.c
2024-07-25 16:13:23 +02:00

29 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* start_philo.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/24 18:19:14 by adjoly #+# #+# */
/* Updated: 2024/07/24 23:01:29 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "philo.h"
void start_philo(t_init *init, uint16_t philo_nbr)
{
uint16_t i;
int r;
i = 0;
while (i < philo_nbr)
{
r = pthread_join(init[i].thread, NULL);
if (r != 0)
return ;
i++;
}
}