aboutsummaryrefslogtreecommitdiff
path: root/philo_two/src/philo_two.h
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-24 13:06:05 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-24 13:06:05 +0200
commit2baa67fd7ad31fe53ab21d257a104478e787fb62 (patch)
treeac38bdf7aecd7056e1b7dfdd51f5403547966380 /philo_two/src/philo_two.h
parent47e1a7b4af69e1998182126310e42af83cf214ed (diff)
downloadphilosophers-2baa67fd7ad31fe53ab21d257a104478e787fb62.tar.gz
philosophers-2baa67fd7ad31fe53ab21d257a104478e787fb62.tar.bz2
philosophers-2baa67fd7ad31fe53ab21d257a104478e787fb62.zip
Replacing mutex stdout by semaphore in philo two, Compilation on Linux
Diffstat (limited to 'philo_two/src/philo_two.h')
-rw-r--r--philo_two/src/philo_two.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/philo_two/src/philo_two.h b/philo_two/src/philo_two.h
index b3f08ed..b947684 100644
--- a/philo_two/src/philo_two.h
+++ b/philo_two/src/philo_two.h
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/14 22:47:23 by cacharle #+# #+# */
-/* Updated: 2020/10/05 14:29:40 by cacharle ### ########.fr */
+/* Updated: 2020/10/24 13:03:58 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,6 +14,7 @@
# define PHILO_TWO_H
# include <unistd.h>
+# include <fcntl.h>
# include <stdbool.h>
# include <pthread.h>
# include <semaphore.h>
@@ -28,7 +29,7 @@ typedef struct
t_time timeout_sleep;
long int meal_num;
bool all_alive;
- pthread_mutex_t mutex_stdout;
+ sem_t *sem_stdout;
} t_philo_conf;
typedef struct