This project implements a semaphore type platform independent in C . Highly influenced by lib dispatch
A sample application can be found in sample.cpp.
#include "cppSemaphore.hpp"
dispatch::semaphore_c(long s)
creates a new semaphore. the parameter s indicates how many signals you have to invoke until you unblock the blocked thread.
You can block the current thread by calling:
dispatch::semaphore_wait(dispatch::semaphore semaphore)
To invoke a signal on the semaphore call:
dispatch::semaphore_signal(dispatch::semaphore_c& semaphore)