0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-24 05:05:50 +00:00
ryujinx-fork/Ryujinx.HLE/HOS/Kernel/KSynchronizationObject.cs

38 lines
845 B
C#
Raw Normal View History

using System.Collections.Generic;
namespace Ryujinx.HLE.HOS.Kernel
{
class KSynchronizationObject
{
public LinkedList<KThread> WaitingThreads;
protected Horizon System;
public KSynchronizationObject(Horizon System)
{
this.System = System;
WaitingThreads = new LinkedList<KThread>();
}
public LinkedListNode<KThread> AddWaitingThread(KThread Thread)
{
return WaitingThreads.AddLast(Thread);
}
public void RemoveWaitingThread(LinkedListNode<KThread> Node)
{
WaitingThreads.Remove(Node);
}
public virtual void Signal()
{
System.Synchronization.SignalObject(this);
}
public virtual bool IsSignaled()
{
return false;
}
}
}