aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_wall_cast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_wall_cast.c')
-rw-r--r--src/ft_wall_cast.c10
1 files changed, 6 insertions, 4 deletions
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);
}