looking like it
This commit is contained in:
parent
8db8d2c8d4
commit
f18301f738
@ -1,12 +1,12 @@
|
|||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* .--. _ */
|
/* .--. _ */
|
||||||
/* init.c |o_o || | */
|
/* init.c :+: :+: :+: */
|
||||||
/* |:_/ || |_ _ ___ __ */
|
/* |:_/ || |_ _ ___ __ */
|
||||||
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
|
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
|
||||||
/* (| | )|_| |_| |> < */
|
/* (| | )|_| |_| |> < */
|
||||||
/* Created: 2023/03/15 02:00:19 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
|
/* Created: 2023/03/15 02:00:19 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
|
||||||
/* Updated: 2023/05/22 05:47:07 by djonker \___)=(___/ */
|
/* Updated: 2023/05/22 07:13:59 by houtworm ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* .--. _ */
|
/* .--. _ */
|
||||||
/* philo.c |o_o || | */
|
/* philo.c :+: :+: :+: */
|
||||||
/* |:_/ || |_ _ ___ __ */
|
/* |:_/ || |_ _ ___ __ */
|
||||||
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
|
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
|
||||||
/* (| | )|_| |_| |> < */
|
/* (| | )|_| |_| |> < */
|
||||||
/* Created: 2023/03/11 06:42:31 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
|
/* Created: 2023/03/11 06:42:31 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
|
||||||
/* Updated: 2023/05/22 05:49:17 by djonker \___)=(___/ */
|
/* Updated: 2023/05/22 07:12:17 by houtworm ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ int ft_startcycle(t_strct *strct)
|
|||||||
sem_close(strct->hold);
|
sem_close(strct->hold);
|
||||||
sem_close(strct->forks);
|
sem_close(strct->forks);
|
||||||
sem_close(strct->print);
|
sem_close(strct->print);
|
||||||
pthread_join(strct->philo[i].thrd, NULL);
|
/*pthread_join(strct->philo[i].thrd, NULL);*/
|
||||||
free(strct);
|
free(strct);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* .--. _ */
|
/* .--. _ */
|
||||||
/* util.c |o_o || | */
|
/* util.c :+: :+: :+: */
|
||||||
/* |:_/ || |_ _ ___ __ */
|
/* |:_/ || |_ _ ___ __ */
|
||||||
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
|
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
|
||||||
/* (| | )|_| |_| |> < */
|
/* (| | )|_| |_| |> < */
|
||||||
/* Created: 2023/03/15 02:01:41 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
|
/* Created: 2023/03/15 02:01:41 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
|
||||||
/* Updated: 2023/05/22 04:34:47 by djonker \___)=(___/ */
|
/* Updated: 2023/05/22 07:15:25 by houtworm ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ int ft_cleanup(t_strct *strct)
|
|||||||
kill(strct->pid[502], 15);
|
kill(strct->pid[502], 15);
|
||||||
while (i < strct->philos)
|
while (i < strct->philos)
|
||||||
{
|
{
|
||||||
pthread_join(strct->philo[i].thrd, NULL);
|
/*pthread_join(strct->philo[i].thrd, NULL);*/
|
||||||
kill(strct->pid[i], 15);
|
kill(strct->pid[i], 15);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user