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