mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 18:30:35 +03:00
Removed usage of pthreads and replaced with std C++ features
- Replaced pthread_mutex_t in modsecurity::operators::Pm with std::mutex - Replaced pthread's thread usage in reading_logs_via_rule_message example with std::thread. - Simplified and modernized C++ code. - Removed unnecessary includes of pthread.h
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <mutex>
|
||||
|
||||
#include "src/operators/operator.h"
|
||||
#include "src/utils/acmp.h"
|
||||
@@ -56,7 +57,7 @@ class Pm : public Operator {
|
||||
#ifdef MODSEC_MUTEX_ON_PM
|
||||
|
||||
private:
|
||||
pthread_mutex_t m_lock;
|
||||
std::mutex m_mutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user