I’ve just uploaded a small library that I’ve been using for a while now. It’s called liblinuxcs (or Linux Critical Section library). So what does it do? Well it basically provides interfaces for InitializeCriticalSection(), DeleteCriticalSection(), EnterCriticalSeciton(), and LeaveCriticalSection() on Linux. If you don’t know what those functions are, then this library is probably not for you. For those that come from a Windows programming background, this library should prove to be very helpful. As you’ll see in the code, this library is built from pthread mutexes.
This library is free to use by anyone and can be modified to your heart’s desire (here’s the license). I do ask that if anyone makes any useful changes or bug fixes that they reply to this post so that everyone can benifit.