#include "philo.h"

void	*philo_exec(void *arg)
{
	t_philo	*philo;

	philo = (t_philo*)arg;
	while (1)
		write(1, philo->str, ft_strlen(philo->str));
}

int	main(void)
{
	pthread_t	id;
	t_philo		*philo;

	philo = malloc(sizeof(philo));
	philo->str = "i'm philosopher\n";
	pthread_create(&id, NULL, &philo_exec, philo);
	pthread_join(id, NULL);
	while (1)
		write(1, "main function\n", 14);      
    return 0;
}

