Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

mutex and threads

Hi,
I'm an absolute beginner and I could really use your help plz.
Using synchronization with mutexes, I need to come up with a program that solves the traffic light problem. If there is a car passing it should lock the mutex and unlock it when it's passed. If the light is red and there is no car passing it should remain red otherwise it should turn green after a minimum number of seconds.
I tried searching on line for some tutorials on threads and mutex but couldn't find anything that helpful.
I deeply appreciate your help on this in advance.
Sign In or Register to comment.