Reece
f559897b42
[-] Removed WorkerId_t typedef [*] Added shared support to some older threading apis that have yet to be updated
29 lines
724 B
C++
29 lines
724 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: ConditionVariable.Unix.hpp
|
|
Date: 2021-6-12
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#if !defined(_AURUNTIME_GENERICCV)
|
|
namespace Aurora::Threading::Primitives
|
|
{
|
|
class ConditionVariableImpl : public IConditionVariable
|
|
{
|
|
public:
|
|
ConditionVariableImpl(const AuSPtr<IConditionMutex> &mutex);
|
|
~ConditionVariableImpl();
|
|
|
|
AuSPtr<IConditionMutex> GetMutex() override;
|
|
bool WaitForSignal(AuUInt32 timeout) override;
|
|
void Signal() override;
|
|
void Broadcast() override;
|
|
|
|
private:
|
|
pthread_cond_t pthreadCv_;
|
|
AuSPtr<IConditionMutexEx> mutex_;
|
|
};
|
|
}
|
|
#endif |