Implement initialization, cleanup and mutex struct
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 28 Mar 2024 09:55:38 +0000 (10:55 +0100)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 28 Mar 2024 09:55:38 +0000 (10:55 +0100)
commit29613319e593e2349c7de434ab87f2865f2fcbc2
tree850c0198c94834fe7320c7065542d254dcb26e7e
parent0f4b83b6d10f4bedca2553937210ee6caddeecc7
Implement initialization, cleanup and mutex struct

The mutex struct is implemented because pthread_mutex_destroy
produces undefined behaviour when supplied with uninitialized mutex.
The struct holds information whether the mutex has been initialized
succesfully.

The header file philo.h has also been filled with declarations of
functions used in main so that Makefiles compiles every file to object.
This is done for easier checking of compile errors.
philo/Makefile
philo/main.c
philo/mem_management.c [new file with mode: 0644]
philo/mutex.c [new file with mode: 0644]
philo/philo.h