2023-12-17 03:29:08 -08:00
|
|
|
#pragma once
|
|
|
|
|
2024-01-14 09:38:57 -08:00
|
|
|
#include "ehs/EHS.h"
|
2023-12-17 03:29:08 -08:00
|
|
|
#include "BaseMutex.h"
|
|
|
|
|
|
|
|
#include <pthread.h>
|
|
|
|
|
2023-12-17 15:56:13 -08:00
|
|
|
namespace ehs
|
2023-12-17 03:29:08 -08:00
|
|
|
{
|
|
|
|
class Mutex : public BaseMutex
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
pthread_mutex_t hdl;
|
|
|
|
|
|
|
|
public:
|
|
|
|
~Mutex() override;
|
|
|
|
|
|
|
|
Mutex();
|
|
|
|
|
|
|
|
Mutex(const Mutex& mutex);
|
|
|
|
|
|
|
|
Mutex& operator=(const Mutex& mutex);
|
|
|
|
|
|
|
|
void Initialize() override;
|
|
|
|
|
|
|
|
void UnInitialize() override;
|
|
|
|
|
|
|
|
void Lock() override;
|
|
|
|
|
|
|
|
void Unlock() override;
|
|
|
|
};
|
|
|
|
}
|