AuroraRuntime/Source/Threading/Primitives/ConditionMutex.Generic.hpp
2021-09-06 11:58:08 +01:00

38 lines
832 B
C++

/***
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_IS_MODERNNT_DERIVED)
#include "ConditionMutex.NT.hpp"
#elif defined(AURORA_HAS_PTHREADS)
#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