OS1/threads
2023-11-29 20:52:34 +00:00
..
main.c we love the stupid one line fixes 2023-11-29 20:52:34 +00:00
main.h Done in one go xP 2023-11-29 20:33:45 +00:00
makefile one last time 2023-11-29 20:50:04 +00:00
readme.md add readme and update makefile 2023-11-29 20:48:53 +00:00

myCounter

My Counter is an implementation of a threaded producer consumer architecture. In this implementation, the producer (main thread) increments the counter and the consumer (spawned thread) prints out the changes to myCount. Some status updates about the locking, waiting, and signaling of threads and mutexes are printed to the output as well.

Compiling

You can compile this program by using the make command or by hand.

Simply type:

make

or, to manually compile, type:

gcc -std=c99 main.c -lpthread -o myCounter

Running

To run, type:

make run

or

./myCounter

to run manually