YARP
Yet Another Robot Platform
RecursiveMutex.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_OS_RECURSIVELOCK_H
7#define YARP_OS_RECURSIVELOCK_H
8
9#include <yarp/conf/system.h>
10
11#if !defined(YARP_INCLUDING_DEPRECATED_HEADER_ON_PURPOSE)
12YARP_COMPILER_WARNING("<yarp/os/RecursiveMutex.h> file is deprecated")
13#endif
14
15#ifndef YARP_NO_DEPRECATED // Since YARP 3.3
16
17#include <yarp/os/api.h>
18#include <mutex>
19
20namespace yarp::os {
21
39class YARP_os_DEPRECATED_API_MSG("Use std::recursive_mutex instead") RecursiveMutex
40{
41public:
46
51
60 void lock();
61
69 bool try_lock();
70
77 void unlock();
78
88 YARP_DEPRECATED_MSG("Use try_lock() instead")
89 bool tryLock();
90
91#ifndef DOXYGEN_SHOULD_SKIP_THIS
92private:
93 class Private;
94 Private* mPriv;
95#endif // DOXYGEN_SHOULD_SKIP_THIS
96};
97
98} // namespace yarp::os
99
100#endif // YARP_NO_DEPRECATED
101
102#endif // YARP_OS_RECURSIVELOCK_H
RecursiveMutex offers exclusive, recursive ownership semantics:
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition: compiler.h:2895
STL namespace.
An interface to the operating system, including Port based communication.
#define YARP_COMPILER_WARNING(x)
Generate a warning at build time on supported compilers.
Definition: system.h:111
#define YARP_os_DEPRECATED_API_MSG(X)
Definition: api.h:21