[*] Ensure these fallback primitives can be accessed by -> operator

This commit is contained in:
Reece Wilson 2024-03-27 03:19:18 +00:00
parent 232a136bfe
commit ec44cc1d69

View File

@ -24,6 +24,11 @@ namespace Aurora::Threading::Primitives
void Unlock();
AuUInt GetOSHandle();
inline WoAConditionMutex *operator ->()
{
return this;
}
private:
pthread_mutex_t value_;
};
@ -39,6 +44,10 @@ namespace Aurora::Threading::Primitives
void Signal();
void Broadcast();
inline WoAConditionVariable *operator ->()
{
return this;
}
private:
friend struct WoAConditionMutex;
pthread_cond_t pthreadCv_;
@ -59,6 +68,10 @@ namespace Aurora::Threading::Primitives
void Unlock(AuUInt16 count);
void Unlock();
inline WoASemaphoreImpl *operator ->()
{
return this;
}
private:
AuInt32 value_ {};
WoAConditionMutex mutex_;