nimp dans timestamp
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
|
||||
typedef pthread_mutex_t t_mtx;
|
||||
|
||||
typedef struct s_time
|
||||
{
|
||||
long int ts;
|
||||
long int tu;
|
||||
} t_time;
|
||||
|
||||
typedef struct s_params
|
||||
{
|
||||
int n_phi; // number_of_philosophers
|
||||
@@ -15,8 +21,7 @@ typedef struct s_params
|
||||
typedef struct s_global
|
||||
{
|
||||
int dead;
|
||||
long int t_start_s;
|
||||
long int t_start_u;
|
||||
t_time t_start;
|
||||
t_mtx m_print;
|
||||
t_mtx m_dead;
|
||||
} t_global;
|
||||
@@ -27,8 +32,8 @@ typedef struct s_philo
|
||||
t_global *global;
|
||||
int p_nbr;
|
||||
t_mtx m_fork;
|
||||
long int t_last_meal_s;
|
||||
long int t_last_meal_u;
|
||||
t_time t_last_meal;
|
||||
int eat;
|
||||
struct s_philo *next;
|
||||
} t_philo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user