#include "philo.h"

int join_threads(t_rules *rules)
{
	int i;
	t_philo *philo;

	i = 0;
	while (i < rules->n_philos)
	{
		philo = &rules->philos[i];
		if (pthread_join(*philo->pid, NULL))
			return (FAILURE);
		i++;
	}
	return (SUCCESS);
}