2018-12-17 23:33:36 -06:00
|
|
|
using Ryujinx.HLE.HOS.Kernel.Common;
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Kernel.Threading
|
2018-09-23 13:11:46 -05:00
|
|
|
{
|
2019-01-18 16:26:39 -06:00
|
|
|
class KWritableEvent : KAutoObject
|
2018-09-23 13:11:46 -05:00
|
|
|
{
|
2020-05-03 22:41:29 -05:00
|
|
|
private readonly KEvent _parent;
|
2018-09-23 13:11:46 -05:00
|
|
|
|
2020-05-03 22:41:29 -05:00
|
|
|
public KWritableEvent(KernelContext context, KEvent parent) : base(context)
|
2018-09-23 13:11:46 -05:00
|
|
|
{
|
2018-12-06 05:16:24 -06:00
|
|
|
_parent = parent;
|
2018-09-23 13:11:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public void Signal()
|
|
|
|
{
|
2018-12-06 05:16:24 -06:00
|
|
|
_parent.ReadableEvent.Signal();
|
2018-09-23 13:11:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public KernelResult Clear()
|
|
|
|
{
|
2018-12-06 05:16:24 -06:00
|
|
|
return _parent.ReadableEvent.Clear();
|
2018-09-23 13:11:46 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|