AuroraRuntime/Source/Threading/Primitives/ConditionMutex.Generic.hpp

38 lines
825 B
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ConditionMutex.Generic.hpp
Date: 2021-6-14
Author: Reece
***/
#pragma once
#include "IConditionMutexEx.hpp"
#if defined(AURORA_PLATFORM_WIN32)
#include "ConditionMutex.Win32.hpp"
#elif defined(_AU_HASPTHREAD)
#include "ConditionMutex.Unix.hpp"
#else
#define _AURUNTIME_GENERICCM
#include "Mutex.Generic.hpp"
namespace Aurora::Threading::Primitives
{
class ConditionMutexImpl : public IConditionMutex
{
public:
UnixConditionMutex();
~UnixConditionMutex();
void Lock() override;
void Unlock() override;
AuUInt GetOSHandle() override;
private:
Mutex mutex_;
};
}
#endif