routine des philosophers ok et debut usage time

This commit is contained in:
Hugo LAMY
2022-01-21 12:05:52 +01:00
parent 9a59f54641
commit 3ee91785f6
4 changed files with 57 additions and 45 deletions

View File

@@ -7,6 +7,7 @@
# include <string.h>
# include <unistd.h>
# include <pthread.h>
# include <sys/time.h>
# include "philo_struct.h"
# include "philo_proto.h"

View File

@@ -15,9 +15,13 @@ typedef struct s_params
typedef struct s_philo
{
t_params *params;
int philo_nbr;
int p_nbr;
t_mtx m_fork;
t_mtx *m_print;
long int t_start_s;
long int t_start_u;
long int t_last_meal_s;
long int t_last_meal_u;
struct s_philo *prev;
struct s_philo *next;
} t_philo;