¡@

Home 

c++ Programming Glossary: coutmutex

bathroom synchronization and queue of threads

http://stackoverflow.com/questions/10474566/bathroom-synchronization-and-queue-of-threads

familiar with semaphores. declarations pthread_mutex_t coutMutex int menInBath int womanInBath int menWaiting int womenWaiting.. bool isFemale LEAVE THESE STATEMENTS pthread_mutex_lock coutMutex cout Enter id isFemale female male endl pthread_mutex_unlock.. Enter id isFemale female male endl pthread_mutex_unlock coutMutex TODO Complete this function if isFemale menInBath 0 womanInBath..