YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
12namespace yarp::os {
13
25{
26public:
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
74private:
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
A mini-server for performing network communication in the background.
A class for thread synchronization and mutual exclusion.
Definition Semaphore.h:25
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition api.h:18