mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-26 18:43:04 +00:00
sockets: Rename Refcount to RefCount
This commit is contained in:
parent
23fa5f4c9c
commit
282892634e
4 changed files with 8 additions and 8 deletions
|
@ -103,7 +103,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
{
|
{
|
||||||
lock (_lock)
|
lock (_lock)
|
||||||
{
|
{
|
||||||
oldFile.Refcount++;
|
oldFile.RefCount++;
|
||||||
|
|
||||||
return RegisterFileDescriptor(oldFile);
|
return RegisterFileDescriptor(oldFile);
|
||||||
}
|
}
|
||||||
|
@ -118,9 +118,9 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
|
|
||||||
if (file != null)
|
if (file != null)
|
||||||
{
|
{
|
||||||
file.Refcount--;
|
file.RefCount--;
|
||||||
|
|
||||||
if (file.Refcount <= 0)
|
if (file.RefCount <= 0)
|
||||||
{
|
{
|
||||||
file.Dispose();
|
file.Dispose();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
interface IFileDescriptor : IDisposable
|
interface IFileDescriptor : IDisposable
|
||||||
{
|
{
|
||||||
bool Blocking { get; set; }
|
bool Blocking { get; set; }
|
||||||
int Refcount { get; set; }
|
int RefCount { get; set; }
|
||||||
|
|
||||||
LinuxError Read(out int readSize, Span<byte> buffer);
|
LinuxError Read(out int readSize, Span<byte> buffer);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||||
UpdateEventStates();
|
UpdateEventStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Refcount { get; set; }
|
public int RefCount { get; set; }
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||||
{
|
{
|
||||||
class ManagedSocket : ISocket
|
class ManagedSocket : ISocket
|
||||||
{
|
{
|
||||||
public int Refcount { get; set; }
|
public int RefCount { get; set; }
|
||||||
|
|
||||||
public AddressFamily AddressFamily => Socket.AddressFamily;
|
public AddressFamily AddressFamily => Socket.AddressFamily;
|
||||||
|
|
||||||
|
@ -32,13 +32,13 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
|
||||||
public ManagedSocket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
|
public ManagedSocket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
|
||||||
{
|
{
|
||||||
Socket = new Socket(addressFamily, socketType, protocolType);
|
Socket = new Socket(addressFamily, socketType, protocolType);
|
||||||
Refcount = 1;
|
RefCount = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ManagedSocket(Socket socket)
|
private ManagedSocket(Socket socket)
|
||||||
{
|
{
|
||||||
Socket = socket;
|
Socket = socket;
|
||||||
Refcount = 1;
|
RefCount = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static SocketFlags ConvertBsdSocketFlags(BsdSocketFlags bsdSocketFlags)
|
private static SocketFlags ConvertBsdSocketFlags(BsdSocketFlags bsdSocketFlags)
|
||||||
|
|
Loading…
Reference in a new issue