diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-30 08:46:00 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-30 08:46:00 +0200 |
| commit | 608ae732eccfe50f2727823f9aebe1f32681edfb (patch) | |
| tree | 01d62708d1c4b0aa444e272c7f19022b5cd70821 /philo_one/src | |
| parent | 42360f381cebd6376c261b16038a7f12971f925e (diff) | |
| download | philosophers-608ae732eccfe50f2727823f9aebe1f32681edfb.tar.gz philosophers-608ae732eccfe50f2727823f9aebe1f32681edfb.tar.bz2 philosophers-608ae732eccfe50f2727823f9aebe1f32681edfb.zip | |
Refactoring philo_two to work with new common lib (not working)
Diffstat (limited to 'philo_one/src')
| -rw-r--r-- | philo_one/src/philo.c | 4 | ||||
| -rw-r--r-- | philo_one/src/routine.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/philo_one/src/philo.c b/philo_one/src/philo.c index 3e21490..fd14674 100644 --- a/philo_one/src/philo.c +++ b/philo_one/src/philo.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/09 23:47:14 by cacharle #+# #+# */ -/* Updated: 2020/09/30 08:10:55 by cacharle ### ########.fr */ +/* Updated: 2020/09/30 08:38:48 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ bool philos_start(t_philo *philos, t_routine_arg *routine_args, int num) while (++i < num) { if (pthread_create(&philos[i].thread, NULL, - (void *(*)(void*))routine_philo, (void*)(routine_args + i)) == -1) + (t_routine)routine_philo, (void*)(routine_args + i)) == -1) return (false); } return (true); diff --git a/philo_one/src/routine.c b/philo_one/src/routine.c index 1803b7d..4b829f0 100644 --- a/philo_one/src/routine.c +++ b/philo_one/src/routine.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/10 01:11:27 by cacharle #+# #+# */ -/* Updated: 2020/09/30 08:17:21 by cacharle ### ########.fr */ +/* Updated: 2020/09/30 08:38:59 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,7 +19,7 @@ void *routine_philo(t_routine_arg *arg) if (!arg->conf->all_alive) return (NULL); arg->philo->time_last_eat = h_time_now(); - if (pthread_create(&thread_death, NULL, (void *(*)(void*))routine_death, arg) != 0) + if (pthread_create(&thread_death, NULL, (t_routine)routine_death, arg) != 0) return (NULL); io_think(arg); while (arg->conf->all_alive) |
