diff --git a/philo/inc/philo.h b/philo/inc/philo.h index 8ba38ff..e58f18e 100644 --- a/philo/inc/philo.h +++ b/philo/inc/philo.h @@ -64,6 +64,8 @@ void print_status(t_philo *philo, char *status); void *philo_routine(void *philo); int join_threads(t_rules *rules); void print_rules(t_rules *rules); +int check_alive(t_philo *philo); + diff --git a/philo/philo b/philo/philo index 8fda598..2de1e7f 100755 Binary files a/philo/philo and b/philo/philo differ diff --git a/philo/src/monitor_death.c b/philo/src/monitor_death.c new file mode 100644 index 0000000..9835129 --- /dev/null +++ b/philo/src/monitor_death.c @@ -0,0 +1,12 @@ +#include "philo.h" + +void *monitor_death(void *arg) +{ + int i; + t_rules *rules; + + rules = (t_rules *) i = 0; + while (i < rules->n_philos) + if (rules->philos[i].last_meal - get_time() < rules->time_to_die) + +} \ No newline at end of file