monitoring WIP
This commit is contained in:
parent
c0b9c33cfa
commit
1707d4ab5c
@ -64,6 +64,8 @@ void print_status(t_philo *philo, char *status);
|
|||||||
void *philo_routine(void *philo);
|
void *philo_routine(void *philo);
|
||||||
int join_threads(t_rules *rules);
|
int join_threads(t_rules *rules);
|
||||||
void print_rules(t_rules *rules);
|
void print_rules(t_rules *rules);
|
||||||
|
int check_alive(t_philo *philo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
philo/philo
BIN
philo/philo
Binary file not shown.
12
philo/src/monitor_death.c
Normal file
12
philo/src/monitor_death.c
Normal file
@ -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)
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user