diff options
Diffstat (limited to 'philo_two/src/philo_two.h')
| -rw-r--r-- | philo_two/src/philo_two.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/philo_two/src/philo_two.h b/philo_two/src/philo_two.h index 5318510..a697382 100644 --- a/philo_two/src/philo_two.h +++ b/philo_two/src/philo_two.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 22:47:23 by cacharle #+# #+# */ -/* Updated: 2020/09/30 08:41:15 by cacharle ### ########.fr */ +/* Updated: 2020/09/30 10:02:50 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,34 +28,33 @@ typedef struct t_time timeout_sleep; long int meal_num; bool all_alive; - pthread_mutex_t mutex_all_alive; pthread_mutex_t mutex_stdout; } t_philo_conf; typedef struct { - int id; + long int id; t_philo_conf *conf; t_time time_last_eat; sem_t *forks; -} t_routine_arg; +} t_philo; /* ** routine.c */ -void *routine_philo(t_routine_arg *arg); -void *routine_death(t_routine_arg *arg); -t_routine_arg *routine_args_create(t_philo_conf *conf, sem_t *forks); +void *routine_philo(t_philo *arg); +void *routine_death(t_philo *arg); +t_philo *routine_create_philos(t_philo_conf *conf, sem_t *forks); /* ** io.c */ -void io_take_fork(t_routine_arg *arg); -void io_eat(t_routine_arg *arg); -void io_think(t_routine_arg *arg); -void io_sleep(t_routine_arg *arg); -void io_die(t_routine_arg *arg); +void event_take_fork(t_philo *arg); +void event_eat(t_philo *arg); +void event_think(t_philo *arg); +void event_sleep(t_philo *arg); +void event_die(t_philo *arg); #endif |
