RSS Git Download  Clone
Raw Blame History
/*******************************************************************************
 *	BCond.h		BCond Classes
 *			T.Barnaby,	BEAM Ltd,	15/11/02
 *******************************************************************************
 */
#ifndef BCOND_H
#define BCOND_H	1

#include <pthread.h>

class BCond {
/// Thread conditional variable
public:
			BCond();
			~BCond();
	
	int		signal();			// Signal the condition. Unblock all threads waiting on condition
	int		wait();				// Wait for contition
	int		timedWait(int timeOutUs);	// Wait for the condition, with timeout
private:
	pthread_mutex_t	omutex;
	pthread_cond_t	ocond;
};

#endif