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

@@ -8,7 +8,7 @@ t_philo *lst_add_philo(t_philo *philo, t_params *params, t_mtx *m_print, int i)
if (new == NULL)
return (NULL);
new->params = params;
new->philo_nbr = i + 1;
new->p_nbr = i + 1;
if (pthread_mutex_init(&(new->m_fork), NULL) != 0)
return (NULL);
new->m_print = m_print;