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