Skip to content

A program that simulates a one-directional bridge (using locks and conditional variables) in C.

Notifications You must be signed in to change notification settings

amith-ananthram/one-directional-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

This code works as intended, and implements both extra features.

For testing, simply:
	make clean
	make bridge

	bridge [NUMBER_OF_CARS_TO_CROSS] [MAX_LOAD_OF_BRIDGE]

	The output should demonstrate the code works.

You can also make test, which runs the test cases that I used in order.

RACE CONDITIONS I AVOIDED:
	COLLISIONS
		- My synchronization prevented cars that are going opposite directions
		  from being on the bridge at the same time.
	TOO MANY CARS
		- My synchronization prevented too many cars (> MAX_LOAD) from being on
		  the bridge at the same time.

About

A program that simulates a one-directional bridge (using locks and conditional variables) in C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages