From b31b9f83ea8884d0a57f2ad37dfc0cd7f33e3c6c Mon Sep 17 00:00:00 2001 From: Romain CLEMENT Date: Tue, 17 Oct 2023 20:56:33 +0200 Subject: [PATCH] Added more semantic by using binary semaphores --- main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index 9123e68..e21f238 100644 --- a/main.cpp +++ b/main.cpp @@ -14,10 +14,10 @@ mutex cout_mutex; // GLOBAL VARIABLES int carsWaiting = 0; mutex mutexCar; -counting_semaphore carArrived(0); -counting_semaphore bayFree(0); -counting_semaphore carWashed(0); -counting_semaphore washingDone(0); +binary_semaphore carArrived(0); +binary_semaphore bayFree(0); +binary_semaphore carWashed(0); +binary_semaphore washingDone(0); void car(size_t id) {