kern: SvcConnectToNamedPort

This commit is contained in:
Michael Scire 2020-07-09 14:49:51 -07:00
parent a2eb93fde8
commit 7400a8ff68
15 changed files with 376 additions and 15 deletions

View file

@ -34,11 +34,41 @@ namespace ams::kern {
}
void KPort::OnClientClosed() {
MESOSPHERE_UNIMPLEMENTED();
MESOSPHERE_ASSERT_THIS();
KScopedSchedulerLock sl;
if (this->state == State::Normal) {
this->state = State::ClientClosed;
}
}
void KPort::OnServerClosed() {
MESOSPHERE_UNIMPLEMENTED();
MESOSPHERE_ASSERT_THIS();
KScopedSchedulerLock sl;
if (this->state == State::Normal) {
this->state = State::ServerClosed;
}
}
Result KPort::EnqueueSession(KServerSession *session) {
KScopedSchedulerLock sl;
R_UNLESS(this->state == State::Normal, svc::ResultPortClosed());
this->server.EnqueueSession(session);
return ResultSuccess();
}
Result KPort::EnqueueSession(KLightServerSession *session) {
KScopedSchedulerLock sl;
R_UNLESS(this->state == State::Normal, svc::ResultPortClosed());
this->server.EnqueueSession(session);
return ResultSuccess();
}
}