mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-15 00:16:48 +00:00
25 lines
718 B
C++
25 lines
718 B
C++
#include <mesosphere/processes/KLightSession.hpp>
|
|
#include <mesosphere/threading/KScopedCriticalSection.hpp>
|
|
#include <mesosphere/threading/KThread.hpp>
|
|
#include <mesosphere/core/KCoreContext.hpp>
|
|
|
|
namespace mesosphere
|
|
{
|
|
|
|
KLightClientSession::~KLightClientSession()
|
|
{
|
|
parent->Terminate(false);
|
|
}
|
|
|
|
Result KLightClientSession::SendSyncRequest(LightSessionRequest *request)
|
|
{
|
|
KScopedCriticalSection critsec{};
|
|
Result res;
|
|
KThread *curThread = KCoreContext::GetCurrentInstance().GetCurrentThread();
|
|
curThread->SetCurrentLightSessionRequest(request);
|
|
curThread->ClearSync();
|
|
res = parent->server.HandleSyncRequest(*curThread);
|
|
return res.IsSuccess() ? curThread->GetSyncResult() : res;
|
|
}
|
|
|
|
}
|