YARP
Yet Another Robot Platform
Semaphore.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#ifndef YARP_OS_SEMAPHORE_H
8
#define YARP_OS_SEMAPHORE_H
9
10
#include <
yarp/os/api.h
>
11
12
namespace
yarp
{
13
namespace
os {
14
25
class
YARP_os_API
Semaphore
26
{
27
public
:
32
Semaphore
(
unsigned
int
initialCount = 1);
33
37
virtual
~
Semaphore
();
38
44
void
wait();
45
46
57
bool
waitWithTimeout(
double
timeoutInSeconds);
58
59
66
bool
check();
67
72
void
post();
73
74
#ifndef DOXYGEN_SHOULD_SKIP_THIS
75
private
:
76
class
Private
;
77
Private
* mPriv;
78
#endif
// DOXYGEN_SHOULD_SKIP_THIS
79
};
80
81
}
// namespace os
82
}
// namespace yarp
83
84
#endif
// YARP_OS_SEMAPHORE_H
yarp::os::Semaphore::Private
Definition:
Semaphore.cpp:15
yarp::os::Semaphore
A class for thread synchronization and mutual exclusion.
Definition:
Semaphore.h:26
yarp
The main, catch-all namespace for YARP.
Definition:
dirs.h:16
api.h
YARP_os_API
#define YARP_os_API
Definition:
api.h:18
YARP
3.5.1
src
libYARP_os
src
yarp
os
Semaphore.h
Generated on Sat Dec 25 2021 02:23:04 for YARP by
1.9.1