Added more semantic by using binary semaphores
This commit is contained in:
parent
6aaaba3eb9
commit
b31b9f83ea
8
main.cpp
8
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user