¡@

Home 

c++ Programming Glossary: max_capacity

Mutual exclusion and semaphores

http://stackoverflow.com/questions/3850491/mutual-exclusion-and-semaphores

restroom 0 int Menwaiting 0 int Womenwaiting 0 semaphore max_capacity semaphore woman semaphore man semaphore mutex semaphore restroomcount.. Woman void for Womenwaiting wait mutex wait woman wait max_capacity wait woman wait mutex wait restroomcount cout A Woman has entered.. endl endl signal restroomcount signal mutex signal max_capacity if Menwaiting Womenwaiting signal man else signal woman ..