Beam-lib  2.16.3
This is the Beam C++ class library.
BCond.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * BCond.h BCond Classes
3  * T.Barnaby, BEAM Ltd, 15/11/02
4  * Copyright (c) 2012 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
5  *******************************************************************************
6  */
7 #ifndef BCOND_H
8 #define BCOND_H 1
9 
10 #include <pthread.h>
11 
12 class BCond {
14 public:
15  BCond();
16  ~BCond();
17 
18  int signal(); // Signal the condition. Unblock all threads waiting on condition
19  int wait(); // Wait for contition
20  int timedWait(int timeOutUs); // Wait for the condition, with timeout
21 private:
22  pthread_mutex_t omutex;
23  pthread_cond_t ocond;
24 };
25 
26 #endif
int timedWait(int timeOutUs)
Definition: BCond.cpp:33
BCond()
Thread conditional variable.
Definition: BCond.cpp:10
Definition: BCond.h:12
int signal()
Definition: BCond.cpp:20
~BCond()
Definition: BCond.cpp:15
int wait()
Definition: BCond.cpp:24