Less invasive fix for EventFd blocking operations (#3394)
This commit is contained in:
parent
70895bdb04
commit
b1bd6a50b5
3 changed files with 7 additions and 26 deletions
|
@ -42,15 +42,12 @@ namespace Ryujinx.HLE.HOS.Services
|
|||
public string Name { get; }
|
||||
public Func<IpcService> SmObjectFactory { get; }
|
||||
|
||||
private int _threadCount;
|
||||
|
||||
public ServerBase(KernelContext context, string name, Func<IpcService> smObjectFactory = null, int threadCount = 1)
|
||||
public ServerBase(KernelContext context, string name, Func<IpcService> smObjectFactory = null)
|
||||
{
|
||||
InitDone = new ManualResetEvent(false);
|
||||
_context = context;
|
||||
Name = name;
|
||||
SmObjectFactory = smObjectFactory;
|
||||
_threadCount = threadCount;
|
||||
|
||||
const ProcessCreationFlags flags =
|
||||
ProcessCreationFlags.EnableAslr |
|
||||
|
@ -86,27 +83,6 @@ namespace Ryujinx.HLE.HOS.Services
|
|||
|
||||
private void Main()
|
||||
{
|
||||
for (int i = 1; i < _threadCount; i++)
|
||||
{
|
||||
KernelResult result = _context.Syscall.CreateThread(out int threadHandle, 0UL, 0UL, 0UL, 44, 3, ServerLoop);
|
||||
|
||||
if (result == KernelResult.Success)
|
||||
{
|
||||
result = _context.Syscall.StartThread(threadHandle);
|
||||
|
||||
if (result != KernelResult.Success)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Service, $"Failed to start thread on {Name}: {result}");
|
||||
}
|
||||
|
||||
_context.Syscall.CloseHandle(threadHandle);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Service, $"Failed to create thread on {Name}: {result}");
|
||||
}
|
||||
}
|
||||
|
||||
ServerLoop();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue