diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-02-15 01:47:26 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-02-15 01:47:26 +0100 |
| commit | 2c5abe421b7a1b92081e38f6b1f04d407fcba834 (patch) | |
| tree | c7e7aa9db3a3b84bd80bc8a5a713d5bfeb6a66f7 /philo_one/philo.c | |
| parent | 6a1e91750ee43fccb6160af0f44139698c8dfdc3 (diff) | |
| download | philosophers-2c5abe421b7a1b92081e38f6b1f04d407fcba834.tar.gz philosophers-2c5abe421b7a1b92081e38f6b1f04d407fcba834.tar.bz2 philosophers-2c5abe421b7a1b92081e38f6b1f04d407fcba834.zip | |
philo_one small refactoring, philo_three draft
Diffstat (limited to 'philo_one/philo.c')
| -rw-r--r-- | philo_one/philo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/philo_one/philo.c b/philo_one/philo.c index 84dfd7f..fffbc6c 100644 --- a/philo_one/philo.c +++ b/philo_one/philo.c @@ -6,13 +6,13 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/09 23:47:14 by cacharle #+# #+# */ -/* Updated: 2020/02/14 20:07:57 by cacharle ### ########.fr */ +/* Updated: 2020/02/15 01:01:51 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "philo_one.h" -t_philo *philos_new(int num) +t_philo *philos_new(int num) { int i; t_philo *philos; @@ -46,7 +46,8 @@ t_bool philos_start(t_philo *philos, t_routine_arg *routine_args, int num) while (++i < num) { philos[i].alive = TRUE; - if (pthread_create(&philos[i].thread, NULL, &routine_philo, (void*)(routine_args + i)) == -1) + if (pthread_create(&philos[i].thread, NULL, + &routine_philo, (void*)(routine_args + i)) == -1) return (FALSE); } return (TRUE); |
