MXS-2271 Use std::mutex instead of pthread_mutex

This commit is contained in:
Esa Korhonen
2019-01-17 14:58:57 +02:00
parent 3125d1babf
commit 40f58ddec8
2 changed files with 86 additions and 112 deletions

View File

@ -19,6 +19,7 @@
#include <maxscale/ccdefs.hh>
#include <atomic>
#include <mutex>
#include <openssl/sha.h>
#include <maxbase/semaphore.hh>
#include <maxbase/worker.hh>
@ -250,9 +251,9 @@ public:
MXS_MONITOR_API* api; /**< The monitor api */
MXS_MONITOR_INSTANCE* instance; /**< Instance returned from startMonitor */
MXS_MONITOR* next; /**< Next monitor in the linked list */
mutable std::mutex lock;
bool active; /**< True if monitor is active */
pthread_mutex_t lock;
monitor_state_t state; /**< The state of the monitor. This should ONLY be written to by the
* admin thread. */