projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.gitignore: ignore local vscode workspace settings file
[lttng-tools.git]
/
src
/
common
/
pthread-lock.hpp
diff --git
a/src/common/pthread-lock.hpp
b/src/common/pthread-lock.hpp
index 824b2f2a91ce03cacedaab5bf6d72c3fb2f8660e..7d037e47226cf2469503bf30b8073915fb134349 100644
(file)
--- a/
src/common/pthread-lock.hpp
+++ b/
src/common/pthread-lock.hpp
@@
-10,8
+10,8
@@
#include <common/exception.hpp>
#include <common/exception.hpp>
-#include <pthread.h>
#include <mutex>
#include <mutex>
+#include <pthread.h>
namespace lttng {
namespace pthread {
namespace lttng {
namespace pthread {
@@
-26,13
+26,17
@@
namespace details {
*/
class mutex {
public:
*/
class mutex {
public:
- explicit mutex(pthread_mutex_t& mutex_p) : _mutex
{mutex_p}
+ explicit mutex(pthread_mutex_t& mutex_p) : _mutex
(mutex_p)
{
}
{
}
+ ~mutex() = default;
+
/* "Not copyable" and "not moveable" Mutex requirements. */
/* "Not copyable" and "not moveable" Mutex requirements. */
- mutex(mutex const &) = delete;
- mutex &operator=(mutex const &) = delete;
+ mutex(mutex const&) = delete;
+ mutex(mutex&&) = delete;
+ mutex& operator=(mutex const&) = delete;
+ mutex& operator=(mutex&&) = delete;
void lock()
{
void lock()
{
@@
-76,11
+80,16
@@
private:
*/
class lock_guard {
public:
*/
class lock_guard {
public:
- explicit lock_guard(pthread_mutex_t& mutex) : _mutex
{mutex}
, _guard(_mutex)
+ explicit lock_guard(pthread_mutex_t& mutex) : _mutex
(mutex)
, _guard(_mutex)
{
}
{
}
- lock_guard(const lock_guard &) = delete;
+ ~lock_guard() = default;
+
+ lock_guard(const lock_guard&) = delete;
+ lock_guard(lock_guard&&) = delete;
+ lock_guard& operator=(const lock_guard&) = delete;
+ lock_guard& operator=(lock_guard&&) = delete;
private:
details::mutex _mutex;
private:
details::mutex _mutex;
This page took
0.023672 seconds
and
4
git commands to generate.