diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-08 16:27:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-08 16:27:08 +0000 |
commit | 81581f9719bc56f01d5aa08952671d65fda9867a (patch) | |
tree | 0f5c6b6138bf169c23c9d24b1fc0a3521385cb18 /ml/Mutex.h | |
parent | Releasing debian version 1.38.1-1. (diff) | |
download | netdata-81581f9719bc56f01d5aa08952671d65fda9867a.tar.xz netdata-81581f9719bc56f01d5aa08952671d65fda9867a.zip |
Merging upstream version 1.39.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/Mutex.h')
-rw-r--r-- | ml/Mutex.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/ml/Mutex.h b/ml/Mutex.h deleted file mode 100644 index fcdb75313..000000000 --- a/ml/Mutex.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef ML_MUTEX_H -#define ML_MUTEX_H - -#include "ml-private.h" - -class Mutex { -public: - Mutex() { - netdata_mutex_init(&M); - } - - void lock() { - netdata_mutex_lock(&M); - } - - void unlock() { - netdata_mutex_unlock(&M); - } - - bool try_lock() { - return netdata_mutex_trylock(&M) == 0; - } - - netdata_mutex_t *inner() { - return &M; - } - - ~Mutex() { - netdata_mutex_destroy(&M); - } - -private: - netdata_mutex_t M; -}; - -#endif /* ML_MUTEX_H */ |