YARP
Yet Another Robot Platform
Mutex.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3
* All rights reserved.
4
*
5
* This software may be modified and distributed under the terms of the
6
* BSD-3-Clause license. See the accompanying LICENSE file for details.
7
*/
8
9
#ifndef YARP_OS_MUTEX_H
10
#define YARP_OS_MUTEX_H
11
12
#include <
yarp/conf/system.h
>
13
14
#if !defined(YARP_INCLUDING_DEPRECATED_HEADER_ON_PURPOSE)
15
YARP_COMPILER_WARNING
(
"<yarp/os/Mutex.h> file is deprecated"
)
16
#endif
17
18
#ifndef YARP_NO_DEPRECATED // Since YARP 3.3
19
20
#include <
yarp/os/api.h
>
21
#include <mutex>
22
23
namespace
yarp
{
24
namespace
os {
25
34
class
YARP_os_DEPRECATED_API_MSG
("Use std::mutex instead")
Mutex
35
{
36
public
:
40
Mutex
();
41
45
~
Mutex
();
46
52
void
lock();
53
61
bool
try_lock();
62
68
void
unlock();
69
79
YARP_DEPRECATED_MSG
(
"Use try_lock() instead"
)
80
bool
tryLock();
81
82
#ifndef DOXYGEN_SHOULD_SKIP_THIS
83
private
:
84
class
Private
;
85
Private
* mPriv;
86
#endif // DOXYGEN_SHOULD_SKIP_THIS
87
};
88
89
}
// namespace os
90
}
// namespace yarp
91
92
#endif // YARP_NO_DEPRECATED
93
94
#endif // YARP_OS_MUTEX_H
api.h
yarp::os::Mutex::Private
Definition:
Mutex.cpp:21
system.h
YARP_DEPRECATED_MSG
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition:
compiler.h:2883
yarp
The main, catch-all namespace for YARP.
Definition:
environment.h:18
YARP_os_DEPRECATED_API_MSG
#define YARP_os_DEPRECATED_API_MSG(X)
Definition:
api.h:23
yarp::os::Mutex
Basic wrapper for mutual exclusion.
Definition:
Mutex.h:35
YARP_COMPILER_WARNING
#define YARP_COMPILER_WARNING(x)
Generate a warning at build time on supported compilers.
Definition:
system.h:112
YARP
3.4.100+20201223.2+gitb8ea4d712
src
libYARP_os
src
yarp
os
Mutex.h
Generated on Sun Jan 3 2021 02:46:25 for YARP by
1.8.20