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::os
{
13
24
class
YARP_os_API
Semaphore
25
{
26
public
:
31
Semaphore
(
unsigned
int
initialCount = 1);
32
36
virtual
~Semaphore
();
37
43
void
wait();
44
45
56
bool
waitWithTimeout(
double
timeoutInSeconds);
57
58
65
bool
check();
66
71
void
post();
72
73
#ifndef DOXYGEN_SHOULD_SKIP_THIS
74
private
:
75
class
Private
;
76
Private
* mPriv;
77
#endif
// DOXYGEN_SHOULD_SKIP_THIS
78
};
79
80
}
// namespace yarp::os
81
82
#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:25
yarp::os
An interface to the operating system, including Port based communication.
Definition:
AbstractCarrier.h:13
api.h
YARP_os_API
#define YARP_os_API
Definition:
api.h:18
YARP
3.7.2+72-20221008.2+gitbb7fa68a9
src
libYARP_os
src
yarp
os
Semaphore.h
Generated on Thu Oct 27 2022 02:58:51 for YARP by
1.9.4