Implement seat_philosophers
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 28 Mar 2024 13:56:54 +0000 (14:56 +0100)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 28 Mar 2024 14:15:02 +0000 (15:15 +0100)
commit25acf8068921fc6abde98dbfdfc2e6684621519e
treeb7ad5f54d1183bd8494754b0e386fda002768c00
parentb31737551bc9f3135f0637a26469dff3deb6b2d6
Implement seat_philosophers

Thanks to the change of how the program keeps track of time
it is possible to set the "last_eaten" member of philo in advance
(to zero - the start) without slowing the seating.

Thanks to this, no delay is necessary before the program checks whether
philos died of hunger. (It was needed in old branch, because
philosophers initialized their own time at the start of their
existance, and the check could happen before the time was set)
philo/main.c
philo/mutex.c
philo/philo.h