2018-03-19 14:58:46 -04:00
|
|
|
using System.Collections.Generic;
|
2018-03-12 00:04:52 -04:00
|
|
|
|
|
|
|
namespace Ryujinx.Core.OsHle.Handles
|
|
|
|
{
|
2018-03-19 14:58:46 -04:00
|
|
|
class KProcessHandleTable
|
2018-03-12 00:04:52 -04:00
|
|
|
{
|
|
|
|
private IdDictionary Handles;
|
|
|
|
|
|
|
|
public KProcessHandleTable()
|
|
|
|
{
|
|
|
|
Handles = new IdDictionary();
|
|
|
|
}
|
|
|
|
|
|
|
|
public int OpenHandle(object Obj)
|
|
|
|
{
|
|
|
|
return Handles.Add(Obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
public T GetData<T>(int Handle)
|
|
|
|
{
|
|
|
|
return Handles.GetData<T>(Handle);
|
|
|
|
}
|
|
|
|
|
2018-03-19 14:58:46 -04:00
|
|
|
public object CloseHandle(int Handle)
|
2018-03-12 00:04:52 -04:00
|
|
|
{
|
|
|
|
return Handles.Delete(Handle);
|
|
|
|
}
|
|
|
|
|
2018-03-19 14:58:46 -04:00
|
|
|
public ICollection<object> Clear()
|
2018-03-12 00:04:52 -04:00
|
|
|
{
|
2018-03-19 14:58:46 -04:00
|
|
|
return Handles.Clear();
|
2018-03-12 00:04:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|