mise en page pour rendu, et annule philo inversees car pbm 610 200 100

This commit is contained in:
Hugo LAMY
2022-02-01 18:15:26 +01:00
parent ef2eb4e921
commit 1dc4de3236
12 changed files with 372 additions and 9 deletions

32
philo/main.c Normal file
View File

@@ -0,0 +1,32 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/26 15:30:40 by hulamy #+# #+# */
/* Updated: 2022/01/26 15:32:30 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
#include "philo.h"
int main(int ac, char **av)
{
pthread_t *id;
t_philo *philo;
int i;
philo = init(ac, av, &id);
if (philo == NULL)
return (0);
launch(philo, id);
i = 0;
while (i < philo->params->n_phi)
{
pthread_join(id[i], NULL);
i++;
}
return (0);
}