38 lines
842 B
C++
38 lines
842 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuConditionMutex.Generic.hpp
|
|
Date: 2021-6-14
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#include "AuIConditionMutexEx.hpp"
|
|
|
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
|
#include "AuConditionMutex.NT.hpp"
|
|
#elif defined(AURORA_HAS_PTHREADS)
|
|
#include "AuConditionMutex.Unix.hpp"
|
|
#else
|
|
#define _AURUNTIME_GENERICCM
|
|
|
|
#include "AuMutex.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
|