2018-03-19 18:58:46 +00:00
|
|
|
using System.Collections.Generic;
|
2018-03-12 04:04:52 +00:00
|
|
|
|
2018-08-16 23:47:36 +00:00
|
|
|
namespace Ryujinx.HLE.HOS.Kernel
|
2018-03-12 04:04:52 +00:00
|
|
|
{
|
2018-03-19 18:58:46 +00:00
|
|
|
class KProcessHandleTable
|
2018-03-12 04:04:52 +00: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 18:58:46 +00:00
|
|
|
public object CloseHandle(int Handle)
|
2018-03-12 04:04:52 +00:00
|
|
|
{
|
|
|
|
return Handles.Delete(Handle);
|
|
|
|
}
|
|
|
|
|
2018-03-19 18:58:46 +00:00
|
|
|
public ICollection<object> Clear()
|
2018-03-12 04:04:52 +00:00
|
|
|
{
|
2018-03-19 18:58:46 +00:00
|
|
|
return Handles.Clear();
|
2018-03-12 04:04:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|