Beamlib
3.3.2
This is the Beam C++ class library.
Loading...
Searching...
No Matches
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
* For license see LICENSE.txt at the root of the beamlib source tree.
8
*/
9
#ifndef BCOND_H
10
#define BCOND_H 1
11
12
#include <pthread.h>
13
15
class
BCond
{
16
public
:
17
BCond
();
18
~BCond
();
19
20
int
signal
();
// Signal the condition. Unblock all threads waiting on condition
21
int
wait
();
// Wait for contition
22
int
timedWait
(
int
timeOutUs);
// Wait for the condition, with timeout
23
private
:
24
pthread_mutex_t omutex;
25
pthread_cond_t ocond;
26
};
27
28
#endif
BCond
Thread safe conditional variable.
Definition:
BCond.h:15
BCond::BCond
BCond()
Definition:
BCond.cpp:12
BCond::timedWait
int timedWait(int timeOutUs)
Definition:
BCond.cpp:35
BCond::signal
int signal()
Definition:
BCond.cpp:22
BCond::~BCond
~BCond()
Definition:
BCond.cpp:17
BCond::wait
int wait()
Definition:
BCond.cpp:26
Generated by
1.9.5