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