ajout static, renames, pere fouettard tweaks
This commit is contained in:
@@ -16,20 +16,19 @@
|
||||
// init.c
|
||||
t_philo *init(int ac, char **av, pthread_t **id);
|
||||
|
||||
// pere_fouettard.c
|
||||
int is_dead(t_philo *philo);
|
||||
void launch_threads(t_philo *philo, pthread_t *id);
|
||||
// launch.c
|
||||
void launch(t_philo *philo, pthread_t *id);
|
||||
|
||||
// exec.c
|
||||
void *philo_exec(void *arg);
|
||||
|
||||
// utils.c
|
||||
// generic.c
|
||||
void init_time(t_philo *philo);
|
||||
void update_time(t_philo *philo);
|
||||
int diff_time(t_time old, struct timeval new);
|
||||
int diff_time(t_time *old, struct timeval *new);
|
||||
int print_message(t_philo *philo, char *clr, char *msg);
|
||||
|
||||
// generic.c
|
||||
// utils.c
|
||||
int ft_atoi(const char *str);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,11 +32,10 @@ typedef struct s_params
|
||||
|
||||
typedef struct s_global
|
||||
{
|
||||
int dead;
|
||||
int n_eat;
|
||||
int stop;
|
||||
int satiated_count;
|
||||
t_time t_start;
|
||||
t_mtx m_print;
|
||||
t_mtx m_dead;
|
||||
} t_global;
|
||||
|
||||
typedef struct s_philo
|
||||
@@ -46,7 +45,7 @@ typedef struct s_philo
|
||||
int p_nbr;
|
||||
t_mtx m_fork;
|
||||
t_time t_last_meal;
|
||||
int eat;
|
||||
int eat_count;
|
||||
struct s_philo *next;
|
||||
} t_philo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user