2018-11-28 17:18:09 -05:00
|
|
|
namespace Ryujinx.HLE.HOS.Kernel
|
|
|
|
{
|
|
|
|
class KClientPort : KSynchronizationObject
|
|
|
|
{
|
2018-12-04 19:52:39 -05:00
|
|
|
private int SessionsCount;
|
|
|
|
private int CurrentCapacity;
|
|
|
|
private int MaxSessions;
|
2018-11-28 17:18:09 -05:00
|
|
|
|
2018-12-04 19:52:39 -05:00
|
|
|
private KPort Parent;
|
2018-11-28 17:18:09 -05:00
|
|
|
|
2018-12-04 19:52:39 -05:00
|
|
|
public KClientPort(Horizon System) : base(System) { }
|
2018-11-28 17:18:09 -05:00
|
|
|
|
2018-12-04 19:52:39 -05:00
|
|
|
public void Initialize(KPort Parent, int MaxSessions)
|
2018-11-28 17:18:09 -05:00
|
|
|
{
|
2018-12-04 19:52:39 -05:00
|
|
|
this.MaxSessions = MaxSessions;
|
|
|
|
this.Parent = Parent;
|
2018-11-28 17:18:09 -05:00
|
|
|
}
|
|
|
|
|
2018-12-04 19:52:39 -05:00
|
|
|
public new static KernelResult RemoveName(Horizon System, string Name)
|
2018-11-28 17:18:09 -05:00
|
|
|
{
|
2018-12-04 19:52:39 -05:00
|
|
|
KAutoObject FoundObj = KAutoObject.FindNamedObject(System, Name);
|
2018-11-28 17:18:09 -05:00
|
|
|
|
2018-12-04 19:52:39 -05:00
|
|
|
if (!(FoundObj is KClientPort))
|
2018-11-28 17:18:09 -05:00
|
|
|
{
|
|
|
|
return KernelResult.NotFound;
|
|
|
|
}
|
|
|
|
|
2018-12-04 19:52:39 -05:00
|
|
|
return KAutoObject.RemoveName(System, Name);
|
2018-11-28 17:18:09 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|