/* ************************************************************************** */1/* */2/* ::: :::::::: */3/* ft_output.c :+: :+: :+: */4/* +:+ +:+ +:+ */5/* By: yabtaour <[email protected]> +#+ +:+ +#+ */6/* +#+#+#+#+#+ +#+ */7/* Created: 2022/05/19 18:04:44 by yabtaour #+# #+# */8/* Updated: 2022/05/19 18:04:47 by yabtaour ### ########.fr */9/* */10/* ************************************************************************** */11#include "philosophers.h"1213void ft_output(t_data *data, int philo_id, char *str)14{15pthread_mutex_lock(&data->output);16if (!(data->is_dead))17{18printf("[%lld] ", ft_timestamp() - data->birth);19printf("Philosopher %d %s\n", philo_id, str);20}21pthread_mutex_unlock(&data->output);22}232425