mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-08-24 08:26:26 -05:00

* Horizon: Implement arp:r and arp:w services * Fix formatting * Remove HLE arp services * Revert "Remove HLE arp services" This reverts commit c576fcccadb963db56b96bacabd1c1ac7abfb1ab. * Keep LibHac impl since it's used in bcat * Addresses gdkchan's feedback * ArpApi in PrepoIpcServer and remove LmApi * Fix 2 * Fixes ArpApi init * Fix encoding * Update PrepoService.cs * Fix prepo
32 lines
847 B
C#
32 lines
847 B
C#
using Ryujinx.Horizon.Sdk.OsTypes;
|
|
using System;
|
|
using System.Threading;
|
|
|
|
namespace Ryujinx.Horizon.Sdk.Arp.Detail
|
|
{
|
|
class ApplicationInstanceManager : IDisposable
|
|
{
|
|
private int _disposalState;
|
|
|
|
public SystemEventType SystemEvent;
|
|
public int EventHandle;
|
|
|
|
public readonly ApplicationInstance[] Entries = new ApplicationInstance[2];
|
|
|
|
public ApplicationInstanceManager()
|
|
{
|
|
Os.CreateSystemEvent(out SystemEvent, EventClearMode.ManualClear, true).AbortOnFailure();
|
|
|
|
EventHandle = Os.GetReadableHandleOfSystemEvent(ref SystemEvent);
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
if (EventHandle != 0 && Interlocked.Exchange(ref _disposalState, 1) == 0)
|
|
{
|
|
Os.DestroySystemEvent(ref SystemEvent);
|
|
}
|
|
}
|
|
}
|
|
}
|