33 lines
695 B
C++
33 lines
695 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: LSMutex.Linux.hpp
|
|
Date: 2022-4-4
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
#include "LSHandle.hpp"
|
|
|
|
namespace Aurora::IO::Loop
|
|
{
|
|
struct LSMutex : ILSMutex, public LSHandle
|
|
{
|
|
LSMutex();
|
|
LSMutex(int handle);
|
|
~LSMutex();
|
|
|
|
bool Unlock() override;
|
|
|
|
virtual bool OnTrigger(AuUInt handle) override;
|
|
|
|
bool IsSignaled() override;
|
|
bool WaitOn(AuUInt32 timeout) override;
|
|
virtual ELoopSource GetType() override;
|
|
|
|
bool bNoAutoRel {};
|
|
private:
|
|
void Init();
|
|
bool IsSignaledNonblocking();
|
|
bool bOwns {};
|
|
};
|
|
} |