eleve g3 dans makefile
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <hulamy@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/01/31 10:23:55 by hulamy #+# #+# */
|
||||
/* Updated: 2022/01/31 18:07:43 by hulamy ### ########.fr */
|
||||
/* Updated: 2022/01/31 19:31:54 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -34,25 +34,6 @@ static int ret_err_unlock(t_mtx *fork1, t_mtx *fork2)
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
Thread #3: lock order "0x54542E8 before 0x54541F8" violated
|
||||
|
||||
Observed (incorrect) order is: acquisition of lock at 0x54541F8
|
||||
at 0x4C3603C: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
|
||||
by 0x4011BC: eat (exec.c:27)
|
||||
by 0x401119: philo_exec (exec.c:72)
|
||||
by 0x4C38C26: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
|
||||
by 0x4E4B6DA: start_thread (pthread_create.c:463)
|
||||
by 0x518471E: clone (clone.S:95)
|
||||
|
||||
followed by a later acquisition of lock at 0x54542E8
|
||||
at 0x4C3603C: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
|
||||
by 0x401226: eat (exec.c:32)
|
||||
by 0x401119: philo_exec (exec.c:72)
|
||||
by 0x4C38C26: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
|
||||
by 0x4E4B6DA: start_thread (pthread_create.c:463)
|
||||
by 0x518471E: clone (clone.S:95)
|
||||
*/
|
||||
static int eat(t_philo *philo, t_mtx *fork1, t_mtx *fork2)
|
||||
{
|
||||
pthread_mutex_lock(fork1);
|
||||
@@ -76,15 +57,9 @@ static int eat(t_philo *philo, t_mtx *fork1, t_mtx *fork2)
|
||||
}
|
||||
|
||||
/*
|
||||
// offset launch :
|
||||
** offset launch :
|
||||
if (philo->p_nbr % 2 == 0)
|
||||
usleep(10 * 1000);
|
||||
// righty / lefty :
|
||||
if (philo->p_nbr % 2 == 0)
|
||||
{
|
||||
fork1 = &(philo->next->m_fork);
|
||||
fork2 = &(philo->m_fork);
|
||||
}
|
||||
*/
|
||||
void *philo_exec(void *arg)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user