Change semaphores array for a structure
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 24 May 2024 13:26:10 +0000 (15:26 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 24 May 2024 13:33:40 +0000 (15:33 +0200)
commit3d2f40c1727b07ef710e56a1df03467799b37965
treec074f623ac3382bf4eca6c5b39f051a66e8ae0ee
parent46653b84f6eaae0163c0314b7114c3b99c20a384
Change semaphores array for a structure

This change is mainly done because norminette sees the old declaration
of semaphores[sem_num] as VLA. Instead of changing the enum, it may be
better to reimplement semaphores as a structure.
This may make a little bit more sense syntactically also?
(compare semaphores[forks] with semaphores.forks)
philo_bonus/helpers.c
philo_bonus/hunger_watcher.c
philo_bonus/main.c
philo_bonus/mem_management.c
philo_bonus/philo.c
philo_bonus/philo.h