aboutsummaryrefslogtreecommitdiff
path: root/common/common.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-02-10 00:34:47 +0100
committerCharles <sircharlesaze@gmail.com>2020-02-10 01:30:53 +0100
commit1a7c6c5a0ed9a5aae1fe45c3af335c120c2dc642 (patch)
tree965aa21be5411d2a9e1156013efc1980bca29f90 /common/common.c
parentdfbafce6506fe5c47b0e60289a9d4629e502c9ac (diff)
downloadphilosophers-1a7c6c5a0ed9a5aae1fe45c3af335c120c2dc642.tar.gz
philosophers-1a7c6c5a0ed9a5aae1fe45c3af335c120c2dc642.tar.bz2
philosophers-1a7c6c5a0ed9a5aae1fe45c3af335c120c2dc642.zip
WIP: philo one
Diffstat (limited to 'common/common.c')
-rw-r--r--common/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/common.c b/common/common.c
index be35e69..03fc32f 100644
--- a/common/common.c
+++ b/common/common.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 23:12:55 by cacharle #+# #+# */
-/* Updated: 2020/02/09 01:36:40 by cacharle ### ########.fr */
+/* Updated: 2020/02/09 23:57:20 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -33,7 +33,7 @@ t_bool parse_args(t_philo_args *philo_args, int argc, char **argv)
return (TRUE);
}
-void philo_put_state_change(t_philo *philo, t_philo_event event) // not correct for philo3
+void philo_put_state_change(int id, t_philo_event event) // not correct for philo3
{
struct timeval tv;
@@ -42,7 +42,7 @@ void philo_put_state_change(t_philo *philo, t_philo_event event) // not corr
h_putnbr(tv.tv_sec);
h_putnbr(tv.tv_usec / 1000);
h_putchar(' ');
- h_putnbr(philo->id);
+ h_putnbr(id);
if (event == EVENT_FORK)
h_putstr(" has taken fork\n");
else if (event == EVENT_EATING)