mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-08-25 05:16:27 -05:00
Horizon: Implement arp:r and arp:w services (#5802)
* 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
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user