prepare to add a verif thread

This commit is contained in:
Camille Chauvet 2023-04-19 14:50:51 +00:00
parent 0ae80bdcca
commit cb2e29d18b

6
main.c
View File

@ -43,7 +43,7 @@ void stop(t_data *data)
pthread_mutex_unlock(&data->stop_mutex);
}
void check_routine(t_data *data)
void *check_routine(t_data *data)
{
size_t i;
bool ok;
@ -55,7 +55,7 @@ void check_routine(t_data *data)
{
stop(data);
printf("g pu faim\n");
return ;
return (NULL);
}
i = 0;
while (i < data->nb_philos)
@ -68,7 +68,7 @@ void check_routine(t_data *data)
{
print_died(philo);
stop(data);
return ;
return (NULL);
}
i++;
}