Beamlib
3.1.2
This is the Beam C++ class library.
Loading...
Searching...
No Matches
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) 2022 All Right Reserved, Beam Ltd, https://www.beam.ltd.uk
5
* For license see LICENSE.txt at the root of the beamlib source tree.
6
*******************************************************************************
7
*/
8
#ifndef BSEMA_H
9
#define BSEMA_H 1
10
11
#include <sys/types.h>
12
#include <semaphore.h>
13
15
class
BSema
{
16
public
:
17
BSema
(
int
value = 0);
18
BSema
(
const
BSema
& sema);
19
~BSema
();
20
21
int
post
();
22
int
wait
();
23
int
timedWait
(
int
timeUs);
24
int
tryWait
();
25
int
getValue
()
const
;
26
27
BSema
&
operator=
(
const
BSema
& sema);
28
private
:
29
sem_t osema;
30
};
31
32
#endif
BSema
Sempahore class.
Definition:
BSema.h:15
BSema::getValue
int getValue() const
Definition:
BSema.cpp:75
BSema::~BSema
~BSema()
Definition:
BSema.cpp:26
BSema::operator=
BSema & operator=(const BSema &sema)
Definition:
BSema.cpp:20
BSema::post
int post()
Post condition.
Definition:
BSema.cpp:30
BSema::wait
int wait()
Wait for contition.
Definition:
BSema.cpp:34
BSema::timedWait
int timedWait(int timeUs)
Wait for condition with timeout.
Definition:
BSema.cpp:48
BSema::tryWait
int tryWait()
Test for the condition.
Definition:
BSema.cpp:71
Generated by
1.9.5