Hello, I need to do some process synchronization in C. I want to use a monitor, and I have read a lot about them. However I have been unable to find out how to implement one in C. I have seen them done in Java and other languages like C++, but I am unable to find examples in C.
I have looked through K&R and there is no example in there. I skimmed through Unix Systems Programming, Communication, Concurrency and Threads, but was unable to find a monitor implementation in there.
This brings me here. Where and how do I define a monitor? How do I implement it within the rest of the code?
/* I am coding in a *nix environment */