24 lines
1.1 KiB
C
24 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: o_ :::::: ::: */
|
|
/* get_death.c :+: / :+::+: :+: */
|
|
/* +:+ > +:++:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#++#++:++#++ */
|
|
/* +#+ +#+#+ +#++#+ +#+ \o/ */
|
|
/* Created: 2025/01/27 14:13:56 by whaffman #+#+# #+#+# #+# #+# | */
|
|
/* Updated: 2025/01/28 17:29:38 by whaffman ### ### ### ### / \ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "philo.h"
|
|
|
|
int get_death(t_philo *philo)
|
|
{
|
|
int death;
|
|
|
|
pthread_mutex_lock(philo->death_lock);
|
|
death = philo->death;
|
|
pthread_mutex_unlock(philo->death_lock);
|
|
return (death);
|
|
}
|