Skip to content

fhammoud/shared_restroom

Repository files navigation

Shared Restroom

This program demonstrates thread syncronization in the Linux environment. It simulates a unisex public restroom with a capacity of 2.

Must be run on Linux.

Rules

  • There can only be up to 2 people in the restroom at one time.
  • Both must be of the same gender.

To test

Must be executed on Linux
  • Clone the project and move to its directory
  • Run make to build the executable
  • Run ./main.out
  • Hit Ctrl+C whenever you want to stop the simulation.
Visual Studio and Windows Subsystem for Linux (WSL)

If you want to use Visual Studio and have WSL installed and configured correctly to be used with Visual Studio:

  • Clone the project
  • Open the solution file in Visual Studio
  • Configure a connection to your WSL installation
  • Run the program

About

Linux thread synchronization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published