CountingSemaphore.cpp

code format="cpp"
 * 1) include "linuxwrap.h"

CountingSemaphore::CountingSemaphore(unsigned int count) {	sem_init(&sem, NULL, count); }

CountingSemaphore::~CountingSemaphore {	sem_destroy(&sem); }

void CountingSemaphore::signal {	sem_post(&sem); }

void CountingSemaphore::wait {	sem_wait(&sem); }

code