40 lines
923 B
C++
40 lines
923 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_IS_LINUX_DERIVED)
|
|
#include "AuConditionMutex.Linux.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
|