return ;
}
-static void take_forks(t_philo *philo)
+// The integer inputs are only there to save me a few lines in the
+// function body
+// This is precisely why I despise how the Norm is written
+// This is much worse solution but it passes norminette
+static void take_forks(t_philo *philo, int i, int forks_taken)
{
- int i;
- int forks_taken;
-
i = 0;
forks_taken = 0;
while (forks_taken < 2 && !end(philo->settings))
static void philo_eat(t_philo *philo)
{
- take_forks(philo);
+ take_forks(philo, 0, 0);
report(philo, "has taken a fork");
report(philo, "has taken a fork");
mutex_lock(&philo->philo_lock);