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