diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-04 12:20:25 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-04 12:20:25 +0100 |
| commit | 907debbb7d1e7ccc4914805cfe4acbed92b82bcc (patch) | |
| tree | 199d60e60d9d9b689062c5f08d6381c090127619 /philo_one/src/philo_one.h | |
| parent | 7e971b3fa805c40d02ac3e996ab1d181f9584866 (diff) | |
| download | philosophers-907debbb7d1e7ccc4914805cfe4acbed92b82bcc.tar.gz philosophers-907debbb7d1e7ccc4914805cfe4acbed92b82bcc.tar.bz2 philosophers-907debbb7d1e7ccc4914805cfe4acbed92b82bcc.zip | |
Added buffered output, Added waiting for all to be started
Diffstat (limited to 'philo_one/src/philo_one.h')
| -rw-r--r-- | philo_one/src/philo_one.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/philo_one/src/philo_one.h b/philo_one/src/philo_one.h index de5f2c4..2ebe708 100644 --- a/philo_one/src/philo_one.h +++ b/philo_one/src/philo_one.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/24 06:11:16 by cacharle #+# #+# */ -/* Updated: 2021/01/03 13:56:16 by cacharle ### ########.fr */ +/* Updated: 2021/01/04 10:38:44 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -51,6 +51,7 @@ typedef struct s_philo pthread_mutex_t *fork_left; pthread_mutex_t *fork_right; pthread_mutex_t *mutex_stdout; + pthread_mutex_t mutex_start; } t_philo; /* @@ -81,7 +82,7 @@ void *routine_death(t_philo *arg); ** io.c */ -void event_take_fork(t_philo *arg, pthread_mutex_t *fork); +void event_take_fork(t_philo *arg); void event_eat(t_philo *arg); void event_think(t_philo *arg); void event_sleep( |
