Beam-lib
2.16.3
This is the Beam C++ class library.
BSema.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* BSema.h BSema Classes
3
* T.Barnaby, BEAM Ltd, 6/11/02
4
* Copyright (c) 2012 All Right Reserved, Beam Ltd, http://www.beam.ltd.uk
5
*******************************************************************************
6
*/
7
#ifndef BSEMA_H
8
#define BSEMA_H 1
9
10
#include <sys/types.h>
11
#include <semaphore.h>
12
14
class
BSema
{
15
public
:
16
BSema
(
int
value = 0);
17
BSema
(
const
BSema
& sema);
18
~BSema
();
19
20
int
post
();
21
int
wait
();
22
int
timedWait
(
int
timeUs);
23
int
tryWait
();
24
int
getValue
()
const
;
25
26
BSema
&
operator=
(
const
BSema
& sema);
27
private
:
28
sem_t osema;
29
};
30
31
#endif
BSema
Sempahore class.
Definition:
BSema.h:14
BSema::tryWait
int tryWait()
Test for the condition.
Definition:
BSema.cpp:71
BSema::getValue
int getValue() const
Definition:
BSema.cpp:75
BSema::operator=
BSema & operator=(const BSema &sema)
Definition:
BSema.cpp:20
BSema::timedWait
int timedWait(int timeUs)
Wait for condition with timeout.
Definition:
BSema.cpp:48
BSema::BSema
BSema(int value=0)
Definition:
BSema.cpp:12
BSema::~BSema
~BSema()
Definition:
BSema.cpp:26
BSema::post
int post()
Post condition.
Definition:
BSema.cpp:30
BSema::wait
int wait()
Wait for contition.
Definition:
BSema.cpp:34
Generated by
1.8.15