From f6a960c09c9593af72ff6da2c3ed501e01a0f429 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 14 Feb 2020 21:24:22 +0100 Subject: philo one working (with what may be a hack) --- common/common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common/common.h') diff --git a/common/common.h b/common/common.h index e314960..a838750 100644 --- a/common/common.h +++ b/common/common.h @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/08 22:58:35 by cacharle #+# #+# */ -/* Updated: 2020/02/14 00:35:30 by cacharle ### ########.fr */ +/* Updated: 2020/02/14 20:45:33 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -48,6 +48,9 @@ typedef struct t_time timeout_eat; t_time timeout_sleep; int meal_num; + t_bool all_alive; + pthread_mutex_t mutex_stdout; + pthread_mutex_t mutex_all_alive; } t_philo_args; typedef void (*t_philo_routine)(void *arg); @@ -79,5 +82,6 @@ void h_putchar(char c); void h_putstr(char *s); void *h_calloc(int count, int size); t_time h_timeval_to_time(struct timeval *tp); +t_time h_time_now(void); #endif -- cgit