From a4342816383dd39666bb6007210eb38b6819469a Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 27 Mar 2020 15:44:12 +0100 Subject: Five threads for compat --- src/ft_wall_cast.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/ft_wall_cast.c') diff --git a/src/ft_wall_cast.c b/src/ft_wall_cast.c index 7610df6..0585f94 100644 --- a/src/ft_wall_cast.c +++ b/src/ft_wall_cast.c @@ -38,7 +38,7 @@ void void *ft_wall_cast(void *vargp) { - pthread_t tid[8]; + pthread_t tid[5]; t_cub *cl; cl = (t_cub *)vargp; @@ -46,10 +46,12 @@ void pthread_create(&tid[1], 0x0, ft_wall_two, (void*)cl); pthread_create(&tid[2], 0x0, ft_wall_three, (void*)cl); pthread_create(&tid[3], 0x0, ft_wall_four, (void*)cl); - pthread_join(tid[0], 0x0); - pthread_join(tid[1], 0x0); - pthread_join(tid[2], 0x0); + pthread_create(&tid[4], 0x0, ft_wall_five, (void*)cl); + pthread_join(tid[4], 0x0); pthread_join(tid[3], 0x0); + pthread_join(tid[2], 0x0); + pthread_join(tid[1], 0x0); + pthread_join(tid[0], 0x0); pthread_exit(0x0); return (0x0); } -- cgit v1.2.3