aboutsummaryrefslogtreecommitdiff
path: root/philo_one/main.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-04-22 13:43:00 +0200
committerCharles <sircharlesaze@gmail.com>2020-04-22 13:43:00 +0200
commit3c2c3a07396c001f51eac8d0fd0fc84e83eb127b (patch)
tree7c646f128d97784fba9fd76cf8bb758a9b965c76 /philo_one/main.c
parent2c5abe421b7a1b92081e38f6b1f04d407fcba834 (diff)
downloadphilosophers-3c2c3a07396c001f51eac8d0fd0fc84e83eb127b.tar.gz
philosophers-3c2c3a07396c001f51eac8d0fd0fc84e83eb127b.tar.bz2
philosophers-3c2c3a07396c001f51eac8d0fd0fc84e83eb127b.zip
philo_one refactoring without common lib
Diffstat (limited to 'philo_one/main.c')
-rw-r--r--philo_one/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/philo_one/main.c b/philo_one/main.c
index abf9d9a..4739c0b 100644
--- a/philo_one/main.c
+++ b/philo_one/main.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/24 05:53:02 by cacharle #+# #+# */
-/* Updated: 2020/02/15 00:57:24 by cacharle ### ########.fr */
+/* Updated: 2020/04/22 13:07:15 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,9 +14,9 @@
int main(int argc, char **argv)
{
- t_philo_args philo_args;
+ t_philo_conf philo_args;
t_philo *philos;
- t_fork *forks;
+ pthread_mutex_t *forks;
t_routine_arg *routine_args;
if (!parse_args(&philo_args, argc, argv))
@@ -27,7 +27,7 @@ int main(int argc, char **argv)
return (1);
if ((routine_args = forks_dispatch(philos, forks, &philo_args)) == NULL)
return (1);
- philo_args.all_alive = TRUE;
+ philo_args.all_alive = true;
pthread_mutex_init(&philo_args.mutex_all_alive, NULL);
pthread_mutex_init(&philo_args.mutex_stdout, NULL);
if (!philos_start(philos, routine_args, philo_args.philo_num))