AuroraRuntime/Source/Threading/Primitives/AuConditionMutex.NT.hpp

31 lines
653 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.
2022-11-17 07:46:07 +00:00
File: AuConditionMutex.Win32.hpp
2021-06-27 21:25:29 +00:00
Date: 2021-6-12
Author: Reece
***/
#pragma once
2022-11-17 07:46:07 +00:00
#include "AuIConditionMutexEx.hpp"
2021-06-27 21:25:29 +00:00
#if !defined(_AURUNTIME_GENERICCM)
namespace Aurora::Threading::Primitives
{
2022-06-01 21:49:38 +00:00
struct Win32ConditionMutex : IConditionMutexEx
2021-06-27 21:25:29 +00:00
{
Win32ConditionMutex();
~Win32ConditionMutex();
bool TryLock() override;
2021-06-27 21:25:29 +00:00
void Lock() override;
void Unlock() override;
AuUInt GetOSHandle() override;
private:
SRWLOCK lock_;
};
using ConditionMutexImpl = Win32ConditionMutex;
}
#endif