2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
2022-11-17 07:46:07 +00:00
|
|
|
File: AuConditionMutex.Generic.hpp
|
2021-06-27 21:25:29 +00:00
|
|
|
Date: 2021-6-14
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
2022-11-17 07:46:07 +00:00
|
|
|
#include "AuIConditionMutexEx.hpp"
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2021-09-06 10:58:08 +00:00
|
|
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
2022-11-17 07:46:07 +00:00
|
|
|
#include "AuConditionMutex.NT.hpp"
|
2023-08-12 10:11:12 +00:00
|
|
|
#elif defined(AURORA_IS_LINUX_DERIVED)
|
|
|
|
#include "AuConditionMutex.Linux.hpp"
|
2021-09-06 10:58:08 +00:00
|
|
|
#elif defined(AURORA_HAS_PTHREADS)
|
2022-11-17 07:46:07 +00:00
|
|
|
#include "AuConditionMutex.Unix.hpp"
|
2021-06-27 21:25:29 +00:00
|
|
|
#else
|
|
|
|
#define _AURUNTIME_GENERICCM
|
|
|
|
|
2022-11-17 07:46:07 +00:00
|
|
|
#include "AuMutex.Generic.hpp"
|
2021-06-27 21:25:29 +00:00
|
|
|
|
|
|
|
namespace Aurora::Threading::Primitives
|
|
|
|
{
|
|
|
|
class ConditionMutexImpl : public IConditionMutex
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UnixConditionMutex();
|
|
|
|
~UnixConditionMutex();
|
|
|
|
|
|
|
|
void Lock() override;
|
|
|
|
void Unlock() override;
|
|
|
|
AuUInt GetOSHandle() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Mutex mutex_;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|